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
| === Epic Snow Leopard Upgrayyyyd Guide === | |
| Son, you’re now living in the land of 64-bit systems. | |
| That means that some of your 32-bit shit is now broken. | |
| Not all is lost. | |
| == Fixing MySQL weirdness |
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
| :⌉ | |
| =⌉ | |
| ¦-) as opposed to | | |
| ☺ | |
| ☹ | |
| ☻ | |
| ⍣ | |
| ⍤ | |
| ⍥ om nom nom | |
| ⍨ |
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 | |
| # | |
| # Save in your .bash_profile then: isreg domain.com | |
| function isreg { | |
| whois $1 | grep -q 'No match' && echo "No" || echo "Yes" | |
| } |
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 'open-uri' | |
| # url dsl -- the ultimate url dsl! | |
| # | |
| # You just can't beat this: | |
| # | |
| # $ irb -r url_dsl | |
| # >> include URLDSL | |
| # => Object | |
| # >> http://github.com/defunkt.json |
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
| Bluepill.application("app_name") do |app| | |
| app.process("app_name") do |process| | |
| process.start_command = "cd /u/apps/app_name/current && /usr/local/bin/unicorn_rails -c /u/apps/app_name/current/config/unicorn.conf.rb -E production -D" | |
| process.stop_command = "kill -QUIT `cat /u/apps/app_name/current/tmp/pids/unicorn.pid`" | |
| process.restart = "kill -USR2 `cat /u/apps/app_name/current/tmp/pids/unicorn.pid`" | |
| process.stdout = process.stderr = "/u/apps/app_name/current/log/unicorn.log" | |
| process.pid_file = "/u/apps/app_name/current/tmp/pids/unicorn.pid" | |
| process.checks :mem_usage, :every => 10.seconds, :below => 250.megabytes, :times => [3, 5] | |
| process.uid = "app" | |
| process.gid = "app" |
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
| // original (http://html5shiv.googlecode.com/svn/trunk/html5.js) | |
| (function(){if(!/*@cc_on!@*/0)return;var e = "abbr,article,aside,audio,canvas,datalist,details,figure,figcaption,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,summary,time,video".split(','),i=e.length;while(i--){document.createElement(e[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
| /* | |
| Copyright (c) 2009 Remy Demarest | |
| Permission is hereby granted, free of charge, to any person | |
| obtaining a copy of this software and associated documentation | |
| files (the "Software"), to deal in the Software without | |
| restriction, including without limitation the rights to use, | |
| copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the | |
| Software is furnished to do so, subject to 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
| // cocoa NSString URI encode addition | |
| @interface NSString (HUAdditions) | |
| - (NSString *)URISafeString; | |
| @end | |
| @implementation NSString (HUAdditions) | |
| - (NSString*)URISafeString { | |
| return (NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)self, NULL, CFSTR(":/?#[]@!$ &'()*+,;=\"<>%{}|\\^~`"), CFStringConvertNSStringEncodingToEncoding(NSUTF8StringEncoding)); | |
| } | |
| @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
| <!--[if IE]> | |
| <script> | |
| document.write(...); | |
| </script> | |
| <![endif]--> | |
| <!--[if !IE]><!--> | |
| <script defer="defer"> | |
| document.write(...); | |
| </script> |
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/sh -e | |
| # | |
| # Usage: browser | |
| # pipe html to a browser | |
| # e.g. | |
| # $ echo "<h1>hi mom!</h1>" | browser | |
| if [ -t 0 ]; then | |
| cat <<usage | |
| Usage: browser |