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:
#!/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 | |
# 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 | |
## 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): |
I hereby claim:
To claim this, I am signing this object:
#!/bin/sh | |
# Writes an APR1-format password hash to the provided <htpasswd-file> for a provided <username> | |
# This is useful where an alternative web server (e.g. nginx) supports APR1 but no `htpasswd` is installed. | |
# The APR1 format provides signifcantly stronger password validation, and is described here: | |
# http://httpd.apache.org/docs/current/misc/password_encryptions.html | |
help (){ | |
cat <<EOF | |
Usage: $0 <htpasswd-file> <username> |
/* MD5 implementation with Unicode support | |
* Javascript's standard "charCodeAt" method returns 32-bit big-endian integers, | |
* which breaks most (JS) MD5 implementations for any input that isn't strictly | |
* 7-bit ASCII (i.e. within 8 bits). This implementation converts Javascript's | |
* character ordinals (including UCS-2) to UTF-8 equivalents, and buffers the | |
* code-points in 8-bit units, so it behaves more like other MD5 implementations | |
* on Unicode input. | |
* | |
* I've put this kit through only a handful test cases, so there maybe issues yet | |
* unknown. Contributions by way of testing, bug filing/fixing, and optimization |
<!-- Google Tag Manager loader; customized by Analytics Pros [analyticspros.com] --> | |
<script> | |
/* Update these for your GTM container(s); be sure they're unique, occurring only once each, not duplicated */ | |
var GTMContainerIDs = ['GTM-XXXXX', 'GTM-YYYYY' ]; | |
window.dataLayer = window.dataLayer || []; | |
window.dataLayer.push({ | |
'platform': 'hubspot' // Update this value to reflect other platforms | |
}); |
<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> |
#!/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) |
/* A lightweight module framework intended to provide (simplified) | |
* AMD-style module support. | |
* | |
* Currently its minified form yields 987 bytes, 577 after gzip compression. | |
* | |
* It DOES NOT parse module identifiers as paths (e.g. "/a/b" or "../a"). | |
* It assumes that all module IDs are simple strings, and seeks an exact | |
* match, without attempting to navigate any hierarchy. | |
* | |
* It DOES NOT parse incoming modules as string for require() statements. |