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
| `ls`.split("\n").each { |file| | |
| puts file if file.include? 'gif' | |
| amt = /(\d+).*\.gif/.match(file)[1] | |
| `mv #{amt}top.gif chip#{amt}.gif` | |
| } |
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
| -module(date_util). | |
| -compile(export_all). | |
| epoch() -> | |
| now_to_seconds(now()) | |
| . | |
| epoch_hires() -> | |
| now_to_seconds_hires(now()) | |
| . |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="init()"> | |
| <mx:Canvas id="cnv" /> | |
| <mx:Script> | |
| <![CDATA[ | |
| [Embed(source="../assets/spritesheet.png")] | |
| private var Sheet:Class; | |
| private static const FRAME_WIDTH:uint = 65; |
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
| v1 -- squares 1 thru 10 | |
| === | |
| <?xml version="1.0" encoding="utf-8"?> | |
| <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="init(event)"> | |
| <mx:Canvas width="800" height="600"> | |
| <mx:Panel> |
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
| # iptables allow rules for ec2 us east (http://developer.amazonwebservices.com/connect/ann.jspa?annID=795) | |
| -A INPUT -s 216.182.224.0/20 -p tcp -m tcp --dport 22 -m state --state NEW -j ACCEPT | |
| -A INPUT -s 72.44.32.0/19 -p tcp -m tcp --dport 22 -m state --state NEW -j ACCEPT | |
| -A INPUT -s 67.202.0.0/18 -p tcp -m tcp --dport 22 -m state --state NEW -j ACCEPT | |
| -A INPUT -s 75.101.128.0/17 -p tcp -m tcp --dport 22 -m state --state NEW -j ACCEPT | |
| -A INPUT -s 174.129.0.0/16 -p tcp -m tcp --dport 22 -m state --state NEW -j ACCEPT | |
| -A INPUT -s 204.236.192.0/18 -p tcp -m tcp --dport 22 -m state --state NEW -j ACCEPT | |
| -A INPUT -s 184.73.0.0/16 -p tcp -m tcp --dport 22 -m state --state NEW -j ACCEPT | |
| -A INPUT -s 184.72.128.0/17 -p tcp -m tcp --dport 22 -m state --state NEW -j ACCEPT |
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
| Chipmunk basic for OS X can be downloaded here: http://www.nicholson.com/rhn/basic/#3 | |
| The algorithm for binary conversion is a simple one, as described here: http://trunix.org/programlama/cpp/fred/notes/cpp/misc/decimal2binary.html | |
| 10 INPUT num | |
| 20 WHILE num > 0 | |
| 30 m = num mod 2 | |
| 40 out$ = str$(m) + out$ | |
| 50 num = int(num/2) | |
| 60 WEND |
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
| #define LED 9 | |
| int i = 0; | |
| void setup() { | |
| pinMode(LED, OUTPUT); | |
| } | |
| void loop() { | |
| for (i = 0; i < 255; i++) { | |
| analogWrite(LED, i); |
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
| #!/usr/bin/ruby | |
| gems_list = Array.new | |
| ARGF.each do |line| | |
| md = /.*\"([^\"]+)\".*(\"[^\"]+\")/.match(line) | |
| gem_name = md.captures[0] | |
| version = md.captures[1] | |
| puts "gem_package \"#{gem_name}\" do\n version #{version}\nend\n\n" | |
| end |
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
| ubuntu@domU-12-31-39-0F-D4-BF:~$ export set ANYVAR='foo | |
| > bar' | |
| ubuntu@domU-12-31-39-0F-D4-BF:~$ irb | |
| irb(main):001:0> require 'rubygems' | |
| => true | |
| irb(main):002:0> require 'rvm' | |
| => true | |
| irb(main):003:0> RVM.list_known_strings | |
| ArgumentError: syntax error on line 25, col 0: `bar' | |
| from /usr/lib/ruby/1.8/yaml.rb:133:in `load' |