Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# Implementation of http://tantek.pbworks.com/NewBase60
# License: http://creativecommons.org/licenses/by-sa/3.0/
n="$1"
s=''
m='0123456789ABCDEFGHJKLMNPQRSTUVWXYZ_abcdefghijkmnopqrstuvwxyz'
if [ -z "$n" ] || [ "$n" -eq "0" ]; then
echo 0
@gabesumner
gabesumner / fiddle.css
Last active November 19, 2023 06:01
Address Validation using the Google Maps API
body {
font: 12px verdana;
background-color: #5C87B2;
}
form {
max-width: 400px;
padding: 15px;
background-color: white;
}
@shime
shime / _README.md
Last active April 2, 2024 17:00
getting tired of guessing tar flags in 2013?

Looks familiar?

Worry no more! Use extract and prosper!

Usage

@ssstonebraker
ssstonebraker / sed cheatsheet
Created August 2, 2013 14:06 — forked from un33k/sed cheatsheet
Sed Cheatsheet
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@davfre
davfre / git_cheat-sheet.md
Last active May 12, 2024 04:37
git commandline cheat-sheet
@hitbtc-com
hitbtc-com / hitbtc_example.php
Last active September 2, 2023 18:34
hitbtc php example
<?php
namespace Hitbtc;
/**
* show off @method
*
* @method string balance() balance( array $params )
* @method string ordersActive() ordersActive( array $params )
* @method string new_order() new_order( array $params )
* @method string cancel_order() cancel_order( array $params )
* @method string trades() trades( array $params )
@yuryoparin
yuryoparin / google_oauth2.sh
Created May 4, 2014 11:19
Google OAuth 2.0 in Bash
#! /bin/bash
# The approx. time to run this script is 145 ms.
# First we extract the private PEM key from the .p12 file:
# openssl pkcs12 -nocerts -passin 'notasecret' -in file.p12 -out ~/google/google.privatekey.pem
KEY='~/google/google.privatekey.pem'
# The fields are ordered by their hash values.
# In Google Client for Java HashMap is used to stack all JSON fields, so String.hashCode() is used for ordering.
@BurnBabyBurn71
BurnBabyBurn71 / User-Pass-gen
Created September 8, 2014 12:24
Reddit random username and password generator - beanon!
import string, random
#User
print('USERNAME - ' + 'beanon' + '-' + ''.join(random.choice(string.digits) for i in range(4)) + ''.join(random.choice(string.ascii_lowercase) for i in range(4)) + ''.join(random.choice(string.ascii_uppercase) for i in range(4)))
#Pass
print('PASSWORD - ' + ''.join(random.choice(string.digits) for i in range(5)) + ''.join(random.choice(string.ascii_lowercase) for i in range(5)) + ''.join(random.choice(string.ascii_uppercase) for i in range(5)))
# MAC ADDRESS SPOOFER
MAC=""
for i in {0..5}; do
VAL=$RANDOM
PART=$(printf "%2X" $VAL)
MAC+=$(printf "%.2s" $PART)
if [ $i -lt 5 ]