Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| (function() { | |
| var script, | |
| scripts = document.getElementsByTagName('script')[0]; | |
| function load(url) { | |
| script = document.createElement('script'); | |
| script.async = true; | |
| script.src = url; | |
| scripts.parentNode.insertBefore(script, scripts); |
| # Generate a module which imports a given subset of module methods | |
| # into the including module or class. | |
| def Methods(source_module, *method_names) | |
| all_methods = source_module.instance_methods + | |
| source_module.private_instance_methods | |
| unwanted_methods = all_methods - method_names | |
| import_module = source_module.clone | |
| import_module.module_eval do | |
| define_singleton_method(:to_s) do | |
| "ImportedMethods(#{source_module}: #{method_names.join(', ')})" |
| # Examples: | |
| # client = FGraph.new("USERNAME") | |
| # | |
| # if you need see response details use: | |
| # client.request # returns a Net::HTTPFound instance, with this you can see the status, headers# Examples: | |
| # client = FGraph.new("USERNAME") | |
| # | |
| # client.data # returns the parsed response body | |
| # if you need an alias to get the api data response, use: |
| sudo ifconfig en1 ether `openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'` |
| # Get Sublime to use your rvm ruby... Change your ~/Library/Application Support/Sublime Text 2/Packages/Ruby/Ruby.sublime-build | |
| # (for ST3: ~/Library/Application Support/Sublime Text 3/Packages/User/Ruby.sublime-build) to this, replacing YOURUSERNAME. | |
| # I am still looking to optimize this further... For example, avoiding hardcoding by using something like $HOME, although | |
| # I have yet to get any form of that to work. | |
| { | |
| "working_dir": "${project_path}", | |
| "cmd": [ | |
| "/Users/YOURUSERNAME/.rvm/bin/rvm-auto-ruby", "-Ilib:test", "$file" | |
| ], |
| #!/bin/bash | |
| echo "Generating an SSL private key to sign your certificate..." | |
| openssl genrsa -des3 -out myssl.key 1024 | |
| echo "Generating a Certificate Signing Request..." | |
| openssl req -new -key myssl.key -out myssl.csr | |
| echo "Removing passphrase from key (for nginx)..." | |
| cp myssl.key myssl.key.org | |
| openssl rsa -in myssl.key.org -out myssl.key |
As configured in my dotfiles.
start new:
tmux
start new with session name: