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 8000| var safariDebug = ( navigator.platform.indexOf("iPhone") < 0 && navigator.platform.indexOf("iPod") < 0 && navigator.platform.indexOf("iPad") < 0 ); | |
| if(safariDebug) | |
| { | |
| PhoneGap.run_command = function() | |
| { | |
| if (!PhoneGap.available || !PhoneGap.queue.ready) | |
| return; |
| #!/bin/bash | |
| function flask-boilerplate-tmux | |
| { | |
| # https://github.com/swaroopch/flask-boilerplate | |
| BASE="$HOME/code/flask-boilerplate" | |
| cd $BASE | |
| tmux start-server | |
| tmux new-session -d -s flaskboilerplate -n model |
| Copyright (c) 2011 ZURB, http://www.zurb.com/ |
| default['nginx']['version'] = "1.2.0" | |
| default['nginx']['passenger']['version'] = "3.0.12" |
| # Store somewhere | |
| class SitemapGenerator | |
| def initialize(app) | |
| @app = app | |
| end | |
| def manipulate_resource_list(resources) | |
| sitemap_builder = ::Middleman::Sitemap::Resource.new( | |
| @app.sitemap, |
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 8000| # in spec_helper.rb | |
| RSpec.configure do |config| | |
| records = [] | |
| config.before :suite do | |
| Cequel::Record.descendants.each do |klass| | |
| klass.after_create {|r| records << r } | |
| end | |
| end |
| #! /bin/sh | |
| # /etc/init.d/kafka: start the kafka daemon. | |
| # chkconfig: - 80 20 | |
| # description: kafka | |
| KAFKA_HOME=/usr/share/kafka | |
| KAFKA_USER=root | |
| KAFKA_SCRIPT=$KAFKA_HOME/bin/kafka-server-start.sh | |
| KAFKA_CONFIG=$KAFKA_HOME/config/server.properties |
via (https://www.linux.com/learn/tutorials/442438-vim-tips-folding-fun)
zf#j creates a fold from the cursor down # lines.zf/string creates a fold from the cursor to string .zj moves the cursor to the next fold.zk moves the cursor to the previous fold.zo opens a fold at the cursor.zO opens all folds at the cursor.zm increases the foldlevel by one.zM closes all open folds.