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
| # Bugs.. | |
| p __FILE__, __dir__, eval('__FILE__', binding, __FILE__, 0), eval('__dir__', binding, __FILE__, 0) | |
| # "dir.rb" | |
| # "/Users/raggi" | |
| # "dir.rb" | |
| # nil |
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
| -----BEGIN PGP PUBLIC KEY BLOCK----- | |
| Version: GnuPG v1.4.12 (Darwin) | |
| mQINBFEkHmoBEACqeBffB0ytt4m3qvZi3+PLDeh8aQ8irYJl4BXm+A5Gih0ApTE1 | |
| +ahMCFuqSfN0MJDvFxcFYPHto4GTQZqG8h+J0AVnh/8zoJnVrvi6k/il1gs0oZSz | |
| lJ9xJb5Wu9sL0ohST51DcOW/JnVEEsz5EamnzNwxFsIHLFmqmZ9gRFeeauKWMpQl | |
| GUlFggMuuGb+LUDEsI3XMv4ISce1F3vugNLXrhanpjKH/qmqTgDQlxIazvxzI87b | |
| VArV9Ol5MSc7o+xvFPR6vozLlGM4I9rUj/kfwVQX6A4ga6TE9D9qdArqRtDPARQN | |
| 0vkApbbpQilQy0ydw50O+M6MtKaxqe65h7y2cxr5enmaZNdqxRByv+qf7ilKXcmr | |
| daCoTVPvWi9H/o2Ufxia6GrC4E5qaEL35WWADYV+LNH2P33izu6Vnw0CCfNsFBlw |
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
| switch (count % 8) | |
| { | |
| case 0:; | |
| <D3492>:; | |
| *to++ = *from++ ; | |
| case 7:; | |
| *to++ = *from++ ; | |
| case 6:; | |
| *to++ = *from++ ; | |
| case 5:; |
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
| $sure = false | |
| t = Thread.new { | |
| begin | |
| # nada | |
| ensure | |
| sleep | |
| $sure = true | |
| # cleanup all the things | |
| 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
| specs.4.8 | |
| prerelease_specs.4.8 | |
| versions.list | |
| names.list | |
| specs | |
| deps | |
| gems |
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 'benchmark' | |
| number_of_rails_methods = 300 | |
| @rails = Class.new do | |
| number_of_rails_methods.times do |i| | |
| class_eval <<-RUBY | |
| def call#{"%02d" % i} # def call01 | |
| end # end | |
| RUBY |
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 sh | |
| if ! which md5sum > /dev/null; then | |
| echo Install md5sum | |
| exit 1 | |
| fi | |
| if ! which curl > /dev/null; then | |
| echo Install curl | |
| exit 1 |
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 Safeware | |
| def initialize(app) | |
| @app = app | |
| end | |
| # This dup pattern is used frequently to avoid race conditions on state stored | |
| # inside this middleware. It's not foolproof, but if you're just using | |
| # single-reference instance variables (instance variables with primitive | |
| # values (not data structures)) then it works well. |
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 zsh | |
| which -s vim > /dev/null && VIM=vim | |
| which -s gvim > /dev/null && VIM=gvim | |
| which -s mvim > /dev/null && VIM=mvim | |
| [[ -e /Applications/MacVim.app/Contents/MacOS/Vim ]] && VIM="/Applications/MacVim.app/Contents/MacOS/Vim" | |
| [[ -z "${VIM}" ]] && echo "No vim found" && exit 1 | |
| # Console vim just gets a straight pass through, as there's no quick way to |
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
| #!/bin/bash | |
| ramfs_size_mb=1024 | |
| mount_point=~/volatile | |
| ramfs_size_sectors=$((${ramfs_size_mb}*1024*1024/512)) | |
| ramdisk_dev=`hdid -nomount ram://${ramfs_size_sectors}` | |
| newfs_hfs -v 'Volatile' ${ramdisk_dev} | |
| mkdir -p ${mount_point} | |
| mount -o noatime -t hfs ${ramdisk_dev} ${mount_point} | |
| echo "remove with:" |