Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

recover on http fail, move configs

  • Loading branch information...
commit 48c09ab6404562bd6dbf950c0424c93af43c2b00 1 parent 3ba166c
@igrigorik authored
View
11 README
@@ -15,3 +15,14 @@ http://github.com/guides/the-github-api
= Top Gitters:
http://github.com/mmcgrana/clj-garden/raw/master/gitcred/RESULTS.txt
+= Music:
+Credits to @gilesgoatboy (also @djgoatboy).
+http://gilesgoatboy.org
+
+= Generating a video
+
+# cutting an mp3 file to right length:
+ffmpeg -i music.mp3 -ss 00:00:00 -t 00:01:00 -vcodec copy -acodec mp3 music-cut.mp3
+
+# generating video from snapshots and mp3
+ffmpeg -f image2 -r 24 -i ./%05d.png -i music-cut.mp3 -acodec copy -sameq ./video.avi -pass 2
View
31 swarm.config → config/swarm.config
@@ -2,25 +2,22 @@
#
# GitHub code_swarm configuration
#
-# SETUP:
-# cd path/to/git/project
-# git-log --name-status --pretty=format:'%n------------------------------------------------------------------------%nr%h | %ae | %ai (%aD) | x lines%nChanged paths:' > my_git_pro
-# python convert_logs.py -g path/to/git/project/my_git_project -o git_log.xml
-#
-# CREATING A VIDEO:
-# http://code.google.com/p/codeswarm/wiki/GeneratingAVideo
-
-
-# Nice skin: http://jmdeldin.com/tmp/frames/
+# Launching visualization:
+# "code_swarm -c swarm_rails.config"
+#
+# Creating a video:
+# http://code.google.com/p/codeswarm/wiki/GeneratingAVideoo
# input file
-InputFile=user-history.log.xml
+InputFile=../logs/user-history.log.xml-schacon
# Frame width and height
#Width=1280
#Height=720
-Width=640
-Height=360
+
+# widescreen
+Width=872
+Height=480
# Particle sprite file
ParticleSpriteFile=src/particle.png
@@ -31,8 +28,8 @@ FontSize=10
BoldFontSize=14
# Save each frame to an image?
-#TakeSnapshots=true
-#SnapshotLocation=snapshots/code_swarm-#####.png
+TakeSnapshots=true
+SnapshotLocation=schacon/#####.png
# Maximum number of Background processes
MaxThreads=2
@@ -40,7 +37,9 @@ MaxThreads=2
# Project time per frame
# -> 8640000 = 1 day
# -> 21915000 => 1 minute = 1 year
-DateSkipper = 8640000
+# FramesPerDay = 24
+#DateSkipper = 8640000
+
# Background in R,G,B
# Background=255,255,255
View
136 config/swarm_rails.config
@@ -0,0 +1,136 @@
+# Author: Ilya Grigorik <http://www.igvita.com/>
+#
+# Launching visualization:
+# "code_swarm -c swarm_rails.config"
+#
+# Creating a video:
+# http://code.google.com/p/codeswarm/wiki/GeneratingAVideo
+
+# input file
+InputFile=../logs/rails-history.log.xml
+
+# Frame width and height
+#Width=1280
+#Height=720
+
+# widescreen format
+Width=872
+Height=480
+
+# Particle sprite file
+ParticleSpriteFile=src/particle.png
+
+#Font Settings
+Font=SansSerif
+FontSize=10
+BoldFontSize=14
+
+# Save each frame to an image?
+TakeSnapshots=true
+SnapshotLocation=rails/#######.png
+
+# Maximum number of Background processes
+MaxThreads=2
+
+# Project time per frame
+# -> 8640000 = 1 day
+# -> 21915000 => 1 minute = 1 year
+DateSkipper = 8640000
+
+# Background in R,G,B
+# Background=255,255,255
+Background=0,0,0
+
+# Color assignment rules, must be in order, no numbers skipped (start at 1)
+#
+# Pattern: "Label", "regex", R,G,B, R,G,B
+# Label is optional. If it is omitted, the regex will be used.
+#
+# orange 255,150,60, 60,60,60
+# bright blue 120,120,255, 120,120,255
+# blue-green 60,255,255, 60,255,255
+# yellow 255,255,50, 255,255,50
+# light green 50,255,50, 50,255,50
+# bright green 50,255,50, 50,255,50
+# dark blue 20,20,255, 20,20,255
+# grey 155,155,155, 155,155,155
+# purple 255,50,255, 255,50,255
+# blue 0,0,255, 0,0,255
+# green 255,0,0, 255,0,0
+# red 0,255,0, 0,255,0
+
+ColorAssign1="Tests","(.*test.*|.*spec*.)", 90,225,90, 110,200,90
+ColorAssign2="Localizations","(.*(\.mo|\.po))|(.*\.lproj.*)", 90,225,225, 110,200,200
+ColorAssign3="Source Code",".*(\.py|\.rb|\.erb|\.hs|\.sql|\.c|\.cpp|\.h|\.m|\.d|\.js|\.pl|\.sh|\.java|\.lhs|\.hi)", 225,90,90, 200,90,110
+ColorAssign4="Documents/Images",".*(\.txt|\.html|\.tex|\.tmpl|\.css|\.xml|\.yml|\.json|\.png|\.jpg|\.gif|\.jpeg|README|COPYING|LICENSE|AUTHORS)", 90,90,225, 90,110,200
+
+# Draw names (combinatory) :
+# Draw sharp names?
+DrawNamesSharp=true
+
+# And draw a glow around names? (Runs slower)
+DrawNamesHalos=false
+
+# Draw files (combinatory) :
+DrawFilesSharp=false
+DrawFilesFuzzy=true
+DrawFilesJelly=true
+
+# Show the Legend at start
+ShowLegend=true
+
+# Show the History at start
+ShowHistory=true
+
+# Show the Date at start
+ShowDate=true
+
+# Show edges between authors and files, mostly for debug purpose
+ShowEdges=false
+
+# Turn on Debug counts.
+ShowDebug=false
+
+# Natural distance of files to people
+EdgeLength=25
+
+# Amount of life to decrement
+#EdgeDecrement=-2
+#FileDecrement=-2
+#PersonDecrement=-7
+
+#Speeds.
+#Optional: NodeSpeed=7.0, If used, FileSpeed and PersonSpeed need not be set.
+# FileSpeed=2.0
+# PersonSpeed=0.1
+
+#Masses
+# FileMass=100.0
+# PersonMass=10.0
+
+# Life of an Edge
+# EdgeLife=250
+
+# Life of a File
+# FileLife=1000
+
+# Life of a Person
+# PersonLife=500
+
+# Highlight percent.
+# This is the amount of time that the person or
+# file will be highlighted.
+#HighlightPct=10
+
+# Uncomment to not use avatars
+#AvatarFetcher=NoAvatar
+
+## Physics engine selection and configuration
+# Directory physics engine config files reside in.
+PhysicsEngineConfigDir=physics_engine
+
+# Force calculation algorithms ("PhysicsEngineLegacy", "PhysicsEngineSimple"...) :
+PhysicsEngineSelection=PhysicsEngineOrderly
+
+# OpenGL is experimental. Use at your own risk.
+UseOpenGL=false
View
15 gitter.rb
@@ -3,7 +3,8 @@
require 'time'
require 'json'
-username = 'igrigorik'
+username = ARGV[0]
+exit if username.nil?
userdata = JSON.parse(open('http://github.com/api/v1/json/'+username).read)["user"]
puts "Author: #{userdata["name"]}"
@@ -26,7 +27,11 @@
user_commits = []
userdata["repositories"].each do |repo|
- repodata = JSON.parse(open("http://github.com/api/v1/json/#{username}/#{repo["name"]}/commits/master").read)
+ begin
+ repodata = JSON.parse(open("http://github.com/api/v1/json/#{username}/#{repo["name"]}/commits/master").read)
+ rescue Exception => e
+ sleep 5; next
+ end
commits = repodata["commits"]
# Sample commit information from API (JSON):
@@ -46,8 +51,12 @@
next if commit["committer"]["email"] != userdata["email"]
puts "#{repo["name"]}: #{commit["id"]}"
+ begin
commitdata = JSON.parse(open("http://github.com/api/v1/json/#{username}/#{repo["name"]}/commit/#{commit["id"]}").read)["commit"]
-
+ rescue Exception => e
+ sleep 5; next
+ end
+
commit["committed_date"] = Time.parse(commit["committed_date"])
commit["repository"] = repo["name"]
commit["details"] = commitdata
Please sign in to comment.
Something went wrong with that request. Please try again.