Skip to content

Instantly share code, notes, and snippets.

View throughnothing's full-sized avatar

William Wolf throughnothing

View GitHub Profile
# NGINX
NGINX_TIMESTAMP %{MONTHDAY}/%{MONTH}/%{YEAR}:%{HOUR}:%{MINUTE}:%{SECOND} %{ISO8601_TIMEZONE}
NGINXCUSTOM %{DATA:request_id} %{NUMBER:status}:%{NUMBER:request_time}:%{NUMBER:upstream_response_time}:%{NUMBER:body_bytes_sent} %{NUMBER:connection} %{IP:remote_ip} %{NOTSPACE:host} %{NOTSPACE:remote_user} \[%{NGINX_TIMESTAMP:timestamp}\] "%{WORD:method} %{NOTSPACE:path} %{NOTSPACE:protocol}" "%{DATA:http_referer}" "%{DATA:user_agent}" "%{DATA:http_forwarded_for}" %{NOTSPACE:upstream_addr} %{GREEDYDATA:upstream_cache_status}
### Keybase proof
I hereby claim:
* I am throughnothing on github.
* I am throughnothing (https://keybase.io/throughnothing) on keybase.
* I have a public key whose fingerprint is D2A3 32BC 2B61 2C33 9FAB 1C89 5840 84D4 423D 17F3
To claim this, I am signing this object:
@throughnothing
throughnothing / README.md
Created February 23, 2015 08:24
SPV Method from Breadwalet
@throughnothing
throughnothing / 0_reuse_code.js
Last active August 29, 2015 14:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@throughnothing
throughnothing / README.md
Last active September 25, 2015 12:18
Setup my dotfiles on a new box

Use

curl throughnothing.com/dotfiles.sh | bash
bash <(curl throughnothing.com/dotfiles.sh)

To use with a specific branch:

curl throughnothing.com/dotfiles.sh | bash -s BRANCH 

bash <(curl throughnothing.com/dotfiles.sh) BRANCH

@throughnothing
throughnothing / gist:936021
Created April 22, 2011 04:37
PRU examples -> Perl
# grep --- all lines including foo
ls -al | grep foo
ls -al | pru /foo/
ls -al | perl -ne 'print if /foo/'
perl -E 'say for <*foo*>'
# grep --- all lines including current date
ls -al | grep $(date +"%Y-%m-%d")
ls -al | pru 'include?(Time.now.strftime("%Y-%m-%d"))'
ls -al | perl -MTime::Piece -ne '$d=localtime->strftime("%Y-%m-%d");print if /$d/'
@throughnothing
throughnothing / gist:947700
Created April 29, 2011 01:50
Hard coded paths for app indicator icon
appdir = '/usr/share/octoindicator/media/'
self.ind = appindicator.Indicator ("octo-indicator",
os.path.join(appdir,"octocat.png"),
appindicator.CATEGORY_COMMUNICATIONS)
self.ind.set_status (appindicator.STATUS_ACTIVE)
self.ind.set_attention_icon (os.path.join(appdir,"octocat-active.png"))
@throughnothing
throughnothing / PostBack.pm
Created October 18, 2011 20:28
Github Postback receiver for announcing events in IRC using Bot::BasicBot::Pluggable::Module
use v5.12;
package Bot::BasicBot::Pluggable::Module::GitHub::PostBack;
use base qw(Bot::BasicBot::Pluggable::Module);
use POE qw/Component::Server::HTTP/;
use CGI::Simple;
use JSON qw(from_json);
sub help {
my ($self, $msg) = @_;
@throughnothing
throughnothing / Readme.md
Created October 28, 2011 23:11
Get epub from instapaper, lwp version

Download Instapaper Epub and put it on my Nook

Simply set the $user and pass variables, then run instapaper.pl when your Nook is plugged in and it will automatically download your instapaper feed to your nook.

@throughnothing
throughnothing / gist:2155004
Created March 22, 2012 01:23
Using Dancer::Logger::ConsoleAggregator in a non web-app contxt
#!/usr/bin/env perl
use Dancer ':syntax';
use Dancer::Factory::Hook;
set logger => 'consoleAggregator';
debug "testing testing 123";
Dancer::Factory::Hook->instance->execute_hooks('after');
debug "test numero dos";