This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global alias.lg=log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(100); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROJECT_ROOT=$(shell pwd) | |
PROJECT_NAME=SampleApp | |
run: | |
@echo "Building with Titanium..." | |
@mkdir -p ${PROJECT_ROOT}/${PROJECT_NAME}/build/iphone/ | |
@PROJECT_NAME=${PROJECT_NAME} PROJECT_ROOT=${PROJECT_ROOT} DEVICE_TYPE=iphone bash ${PROJECT_ROOT}/bin/titanium.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: colored_tail.sh [logfile] | |
tail -f ${1} | perl -pe 's/^\[DEBUG\].*$/\e[35m$&\e[0m/g;s/^\[INFO\].*$/\e[36m$&\e[0m/g;s/^\[WARN\].*$/\e[33m$&\e[0m/g;s/^\[ERROR\].*$/\e[31m$&\e[0m/g;' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -w '\nLookup time:\t%{time_namelookup}\nConnect time:\t%{time_connect}\nPreXfer time:\t%{time_pretransfer}\nStartXfer time:\t%{time_starttransfer}\n\nTotal time:\t%{time_total}\n' -o /dev/null -s 'http://gc.blog.br' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
Copyright (c) 2008, Christian Mittendorf <[email protected]> | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions are met: | |
Redistributions of source code must retain the above copyright notice, this | |
list ofconditions and the following disclaimer. Redistributions in binary form | |
must reproduce the above copyright notice, this list of conditions and the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function () { | |
var toc = $("<ul>").css("margin-bottom", "20px !important"); | |
$("div.main div.wikistyle h1,h2").each(function() { | |
var id = $(this).text().replace(/\s+/g, "_").replace(/[^0-9a-zA-Z_.-]/g, "") | |
$(this).attr("id", id) | |
if (this.tagName == "H1") { | |
toc.append( | |
$("<li>").append($("<b>").append($("<a>").attr("href", "#" + id).text($(this).text()))) | |
) | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function () { | |
var toc = $("<ul>").css("margin-bottom", "20px !important"); | |
$("div.main div.wikistyle h2").each(function() { | |
var id = $(this).text().replace(/\s+/g, "_").replace(/[^0-9a-zA-Z_.-]/g, "") | |
$(this).attr("id", id) | |
toc.append( | |
$("<li>").append($("<b>").append($("<a>").attr("href", "#" + id).text($(this).text()))) | |
) | |
}); | |
$("div.wikistyle").prepend(toc).prepend($("<h2>").text("Table of Contents")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Vimeo requirements for HD video: | |
# -r 30 --> 30 frames per second | |
# -b 5000k --> bitrate = 5000 k | |
# -s 1920x1080 --> sets output size | |
# -vcodec libx264 --> encodes using h.264 | |
ffmpeg -i ~/Desktop/source.mpg -deinterlace -r 30 -b 5000k -vcodec libx264 -vpre libx264-hq -s 1920x1080 ~/Desktop/destination.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require "rubygems" | |
require "integrity" | |
class Refresher | |
JS = <<-EOS | |
<script type="text/javascript"> | |
//<![CDATA[ | |
setTimeout('location.reload()', %s * 1000) | |
//]]> |
NewerOlder