I hereby claim:
- I am samba on github.
- I am samba (https://keybase.io/samba) on keybase.
- I have a public key whose fingerprint is 3B42 C4DA F1B2 70E8 8046 7EA5 6AAA C9B0 7ACE 561D
To claim this, I am signing this object:
#!/bin/sh | |
'''USAGE: | |
pyprofile.sh run yourscript.py {your arguments} # Runs your program & stores statistics | |
pyprofile.sh show # Reports your statistics | |
Within the report mode, use 'help' to learn additional commands. | |
Initial recommendation: | |
sort cumtime ncalls # List function calls by total time spent in each function | |
stats 30 # Show top 30 function calls (by sorted metric, descending) |
<script> | |
var GTMContainerIDs = ['GTM-XXXXX', 'GTM-YYYYY' /* Add your container ID(s) here */ ]; | |
(function(w,d,s,l,i,j,f,dl,k,q){ | |
w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'}); | |
f=d.getElementsByTagName(s)[0], k=i.length; | |
q='//www.googletagmanager.com/gtm.js?id=@&l='+(l||'dataLayer'); | |
while(k--){j=d.createElement(s);j.async=!0;j.src=q.replace('@',i[k]);f.parentNode.insertBefore(j,f);} | |
}(window,document,'script','dataLayer',GTMContainerIDs)); | |
</script> |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python | |
## Adjusts HTML structure and applies style attributes (etc) to static HTML. | |
## Conceptually inspired by jQuery, of course. | |
import sys | |
from xml.etree import ElementTree as tree | |
class QueryResult(object): | |
def __init__(self, matches): |
#!/bin/sh | |
# For Mac environments, where settings are stored in "~/Library/Application\ Support"... | |
# For linux it's "~/.sublime-text-3" (I guess...) | |
zip -r ~/Dropbox/Settings/Sublime.zip ~/Library/Application\ Support/Sublime\ Text\ 3/{Installed\ Packages,Local,Packages,Cache/Theme*} |
#!/usr/bin/env python | |
import socket | |
import argparse | |
import sys | |
import re | |
def test_domain(domain_name): | |
try: | |
return bool(socket.gethostbyname(domain_name)) |
#!/bin/sh | |
# Nginx Cache Manager (search, remove content by URL or grep) | |
# NOTE: | |
# in my nginx config, I use: | |
# proxy_cache_key $scheme://$host$uri$is_args$args@$remote_user; | |
# ... which facilitates easier searching of cache files | |
cachefiles () { | |
find /var/lib/nginx/cache -type f $@ | |
} |
/* Set theory implementation, woot! | |
* (c) Sam Briesemeister, 2012 | |
* | |
* | |
* Uses Javascript objects' properties as a shortcut for determining set content. | |
* | |
* Elements must be string-like or numeric. | |
* | |
* Usage: | |
* |
#!/bin/sh | |
# usage: | |
# sudo dd-local-monitor.sh if=/dev/sda bs=24M | gzip > /mnt/external/myimage.blob.gz | |
main () { | |
echo "# dd: $@" >&2 | |
dd $@ & |
/* CSV parser | |
* (c) Sam Briesemeister, 2012 | |
* | |
* Features: | |
* - Parses CSV through a sequential tokenizer | |
* - Supports alternative field separator and quote characters | |
* - Ignores empty lines and comments (lines starting with #) | |
* - Provides label support through lookup function | |
* | |
* Usage: |