// jQuery
$(document).ready(function() {
// code
})
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
| # config.ru for Pow + Wordpress, based on http://stuff-things.net/2011/05/16/legacy-development-with-pow/ | |
| # added hackery to work around wordpress issues - Patrick Anderson ([email protected]) | |
| # clearly this could be cleaner, but it does work | |
| require 'rack' | |
| require 'rack-legacy' | |
| require 'rack-rewrite' | |
| # patch Php from rack-legacy to substitute the original request so | |
| # WP's redirect_canonical doesn't do an infinite redirect of / |
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
| require 'active_support/core_ext/time/calculations' | |
| unless Time.method_defined?(:beginning_of_hour) | |
| class Time | |
| # Returns a new Time representing the start of the hour (x:00) | |
| def beginning_of_hour | |
| change(:min => 0) | |
| end | |
| alias :at_beginning_of_hour :beginning_of_hour | |
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
| "it's also not served over SSL, so you know, LOLZ" | |
| "sslols" | |
| "Secure Socket Laughters" | |
| "It's for in jokes, so you can really make sure that nobody else gets it" |
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> | |
| <meta charset="utf-8"> | |
| <style> | |
| body { | |
| font:12px/20px 'Helvetica'; | |
| } | |
| textarea, input { | |
| width:100%; | |
| height:20px; | |
| margin:0; |
Prerequisites
- Somewhat modern version of OpenSSH
- Server you have SSH access to in the region you want to stream from.
Bummed about region lock? Start up your terminal and do this:
$ ssh -N -D 9999 yourserver.com
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
| from sys import stdin, stdout | |
| import argparse | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument('-r', action='store_const', const=True, required=False, default=False) | |
| args = parser.parse_args() | |
| stdout.writelines(sorted(stdin.readlines(), reverse = args.r)) |
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
| if (!Function.prototype.bind) { | |
| Function.prototype.bind = function bind(thisValue){ | |
| var func = this; | |
| return function() { | |
| return func.apply(thisValue, arguments); | |
| } | |
| } | |
| } |
If you don't have homebrew installed - get homebrew here
Then run: brew install elasticsearch
Update the elasticsearch configuration file in /usr/local/etc/elasticsearch/elasticsearch.yml.