This file contains hidden or 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
"101aff".scan(/../).map {|color| color.to_i(16)} |
This file contains hidden or 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
find ./ -name ".svn" | xargs rm -Rf |
This file contains hidden or 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
OUTF=rem-duplicates.sh; echo "#! /bin/sh" > $OUTF; find . "$@" -type f -print0 | xargs -0 -n1 gmd5sum | sort --key=1,32 | guniq -w 32 -d --all-repeated=separate | gsed -r 's/^[0-9a-f]*( )*//;s/([^a-zA-Z0-9./_-])/\\\1/g;s/(.+)/#rm \1/' >> $OUTF; chmod a+x $OUTF; ls -l $OUTF |
This file contains hidden or 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
javascript:void((function(){var e=document.createElement('script');e.setAttribute('src','http://xlxx.sinaapp.com/xlvod.js');document.body.appendChild(e);})()) |
This file contains hidden or 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
javascript:void((function(){var e=document.createElement('script');e.setAttribute('src','http://xlxx.sinaapp.com/xlvod.js');document.body.appendChild(e);})()) |
This file contains hidden or 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
- (void) drawTextInRect:(CGRect)rect { | |
CGSize myShadowOffset = CGSizeMake(0, 0); | |
float myColorValues[] = {0, 0, 0, .8}; | |
CGContextRef myContext = UIGraphicsGetCurrentContext(); | |
CGContextSaveGState(myContext); | |
CGColorSpaceRef myColorSpace = CGColorSpaceCreateDeviceRGB(); | |
CGColorRef myColor = CGColorCreate(myColorSpace, myColorValues); | |
CGContextSetShadowWithColor (myContext, myShadowOffset, 2, myColor); |
This file contains hidden or 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
# Copy/Export a Large Database | |
mysqldump -u [USERNAME] -p [DBNAME] | gzip > [/path_to_file/DBNAME].sql.gz | |
################################################################################# | |
# Import a Large Database | |
gzip -d [/path_to_file/DBNAME].sql.gz | |
[/path_to_mysql/]mysql -u [USERNAME] -p | |
# DO THE FOLLOWING |
This file contains hidden or 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
class Map | |
constructor: (@el, @collection, template = "", @shadow = "") -> | |
@options = | |
zoom: 13 | |
mapTypeId: google.maps.MapTypeId.ROADMAP | |
@map = new google.maps.Map @el, @options | |
@setTemplate template | |
setTemplate: (template)-> |
This file contains hidden or 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
require 'sinatra' | |
post '/upload' do | |
unless params[:file] && | |
(tmpfile = params[:file][:tempfile]) && | |
(name = params[:file][:filename]) | |
@error = "No file selected" | |
return haml(:upload) | |
end | |
STDERR.puts "Uploading file, original name #{name.inspect}" |
This file contains hidden or 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
%form{:action=>"/upload",:method=>"post",:enctype=>"multipart/form-data"} | |
%input{:type=>"file",:name=>"file"} | |
%input{:type=>"submit",:value=>"Upload"} |
OlderNewer