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
| 12345678901234567890123456789012345678901234567890123456789012345678901234567890 | |
| 00000000001111111111222222222233333333334444444444555555555566666666667777777777 |
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
| var http = require('http'), | |
| userAgent = require('useragent'); | |
| http.createServer(function (request, response) { | |
| var userAgentString = request.headers['user-agent'], | |
| ua_obj = userAgent.parse(userAgentString), | |
| is = userAgent.is(userAgentString), | |
| content = ""; |
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
| # Array#join vs String#+ | |
| require 'benchmark' | |
| n = 1_000_000 | |
| Benchmark.bm do |x| | |
| x.report('Array#join :') { | |
| n.times { ['this', 'is', 'a', 'test'].join(' ') } | |
| } | |
| x.report('String#+ :') { |
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
| # Set postgis-1.5 path. | |
| $ POSTGIS_SQL_PATH=`pg_config --sharedir`/contrib/postgis-1.5 | |
| # Creating the template spatial database | |
| $ createdb -E UTF8 -T template0 template_postgis | |
| # and add PLPGSQL language support. | |
| $ createlang -d template_postgis plpgsql | |
| # Loading the PostGIS SQL routines. | |
| $ psql -d template_postgis -f $POSTGIS_SQL_PATH/postgis.sql |
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
| [api]: New apis / changes to apis | |
| [test]: Update test/* files | |
| [dist]: Changes to submodules, version bumps, updates to package.json | |
| [minor]: Small changes | |
| [doc]: Updates to documentation | |
| [ux]: Updates to UX | |
| [fix]: Bug fixes | |
| [bin]: Update binary scripts associated with the project | |
| [merge]: Resolved git merge from upstream or otherwise | |
| [refactor]: Refactor of existing code with no external API changes |
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/env ruby | |
| # Place this script in your shell's load path | |
| require 'rubygems' | |
| begin | |
| require 'highline/import' | |
| rescue | |
| puts "'sudo gem install highline' in your system Ruby" | |
| end | |
| # Generate .rvmrc file in a project directory |
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 'autotest/redgreen' | |
| # require 'autotest/pretty' | |
| # require 'autotest/snarl' | |
| # require 'autotest/timestamp' | |
| module Autotest::Growl | |
| def self.growl title, msg, img, pri=0, sticky="" | |
| system "growlnotify -n autotest --image #{img} -p #{pri} -m #{msg.inspect} #{title} #{sticky}" | |
| end |
NewerOlder