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
| #rvm | |
| \curl -#L https://get.rvm.io | sudo bash -s stable --autolibs=3 --ruby | |
| #passenger | |
| gem install passenger --pre | |
| #nginx | |
| #http://nginx.org/en/download.html | |
| #set paths |
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 | |
| require 'syslog' | |
| require 'net/http' | |
| require 'aws-sdk' | |
| Syslog.open | |
| AWS.config({ | |
| :access_key_id => '<iam user key>', | |
| :secret_access_key => '<iam user secret>' |
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
| def age(time) | |
| if time.kind_of?(Date) | |
| timestamp = time.to_time.to_i | |
| elsif time.kind_of?(Time) | |
| timestamp = time.to_i | |
| else | |
| return 0 | |
| end | |
| (Time.now.to_i - timestamp) / 31536000 |
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
| Unlimited gdb print command: | |
| set print elements 0 | |
| Print void* string content: | |
| p (char *)variable+16 |
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
| <meta property="product:price:amount" content="0.99"/> | |
| <meta property="product:price:currency" content="USD"/> | |
| <meta property="product:price:amount" content="0.79"/> | |
| <meta property="product:price:currency" content="EUR"/> |
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
| # bootstrapping new node: | |
| knife bootstrap <hostname> -x <username> -P <password> --sudo | |
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 module1 = function(param1, param2) { | |
| var m_param1 = param1; | |
| var m_param2 = param2; | |
| var private_method = function(param3) { | |
| return param3 + m_param1 + m_param2; | |
| }; | |
| return { | |
| public_method1: function(param1) { |
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
| Windows Registry Editor Version 5.00 | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] | |
| "DefaultUserName"="<username>" | |
| "DefaultPassword"="<password>" | |
| "AutoAdminLogon"="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
| #!upstart | |
| description "<project>" | |
| author "<author>" | |
| env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
| respawn | |
| start on runlevel [23] | |
| 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title></title> | |
| <script src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> | |
| </head> | |
| <body> | |
| <div id="ytapiplayer">You need Flash player 8+ and JavaScript enabled to view this video.</div> |