This file contains 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
hello = 'Hello' | |
puts Process.pid | |
while true | |
Signal.trap('USR1'){ | |
hello = 'HALLO!' | |
} | |
Signal.trap('USR2'){ | |
hello = 'Hello' | |
} |
This file contains 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
<snippet> | |
<content><![CDATA[ | |
do | |
${1} | |
end]]></content> | |
<description>do...end block</description> | |
<tabTrigger>doe</tabTrigger> | |
<scope>source.ruby</scope> | |
</snippet> |
This file contains 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 'net/ldap' | |
require 'io/console' | |
class LDAPUser | |
def connect(user_name, password) | |
ldap = Net::LDAP.new(:host => 'example.com', :port => 389) | |
ldap.auth("CN=#{user_name},OU=Users,DC=example,DC=com", password) | |
begin |
This file contains 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 | |
### BEGIN INIT INFO | |
# Provides: unicorn | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the unicorn web server | |
# Description: starts unicorn |
This file contains 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
$ rails new <app_name> --skip-test-unit | |
$ cd <app_name>/ | |
$ git init | |
$ git add . | |
$ git commit -m 'first commit' | |
$ git remote add origin <git repo> | |
$ git push -u origin master | |
$ mate . | |
/** |
This file contains 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"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.mrkplt.sockfix</string> | |
<key>Program</key> | |
<string>/bin/ln</string> | |
<key>ProgramArguments</key> | |
<array> |
NewerOlder