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 generate_code(len = 5) | |
| (1..len).map { (("a".."z").to_a + ("A".."Z").to_a + (0..9).to_a)[rand(62)] }.join | |
| 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
| #!/usr/bin/python | |
| usage = ''' | |
| Takes the URL of the frontmost Safari window/tab and | |
| shortens using the service at bit.ly. The shortened | |
| URL is put on the clipboard, ready for pasting. |
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 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
| <head> | |
| <title></title> | |
| </head> | |
| <body> | |
| </body> |
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
| dir /a /b c:\windows\$ntuninstallkb* > kbs.txt && for /f %i in (kbs.txt) do cd c:\windows\%i\spuninst && spuninst.exe /passive /norestart && ping -n 15 localhost > nul |
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
| <html> | |
| <head> | |
| <title>Fetch Image</title> | |
| <script type="text/javascript" src="index.js"></script> | |
| <link href="index.css" rel="stylesheet" type="text/css"/> | |
| </head> | |
| <body> | |
| <h3>Fetch Image From URL:</h3> | |
| <div style='font-weight:bold'>Title</div> | |
| <input id="imgTitle" type="text"></input> |
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
| Titanium.UI.setBackgroundColor('#000'); | |
| var tab_group = Ti.UI.createTabGroup(); | |
| var win = Titanium.UI.createWindow({ }); | |
| win.hideTabBar(); | |
| var edit = Titanium.UI.createButton({title:'Move'}); | |
| win.setRightNavButton(edit); | |
| var data = [ | |
| {title: 'foo'}, |
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
| Titanium.UI.setBackgroundColor('#000'); | |
| var tabGroup = Titanium.UI.createTabGroup(); | |
| var win = Titanium.UI.createWindow({ | |
| title:'Tab', | |
| backgroundColor:'#fff' | |
| }); | |
| var tab = Titanium.UI.createTab({ |
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
| # | |
| # Inspired by | |
| # http://dev.rubyonrails.org/svn/rails/plugins/account_location/lib/account_location.rb | |
| # | |
| module SubdomainAccounts | |
| def self.included( controller ) | |
| controller.helper_method(:account_domain, :account_subdomain, :account_url, :current_account, :default_account_subdomain, :default_account_url) | |
| end | |
| protected |
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 Person.new(); | |
| # person.firstName() returns null | |
| <mx:TextField value="{person.firstName}" /> | |
| # lets say you enter "Jae" into the textfield | |
| # person.firstName() would now return Jae |
OlderNewer