This file contains 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
/** | |
* utils.js | |
* | |
* @author Niko Heikkilä (@ytserman) <http://scr.im/ytserman> | |
* | |
* Contains several utility functions for cross-browser compatibility. | |
* Drop this into your javascript folder and call before other scripts. | |
* | |
*/ | |
function createRequest() { |
This file contains 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
import os, sys, hashlib | |
# -*- coding: utf-8 -*- | |
def encryptMAC(address): | |
''' Generate MD5 checksum from unicode physical address ''' | |
try: | |
# Calculate checksum | |
print("Calculating, please wait...", end="\n") | |
checksum = hashlib.md5(address.encode('utf-8')) |
This file contains 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> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> | |
<head> | |
<!-- Headers and title text --> | |
<meta charset="utf-8"> | |
<title> |
This file contains 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
################################################################# | |
# # | |
# PRINTR.PY # | |
# # | |
# Advanced printing for python terminal or file handling # | |
# Homepage: http://pypi.python.org/pypi/printr # | |
# # | |
################################################################# | |
import sys |
This file contains 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
<?php | |
/** | |
* cURL Wrapper trait for PHP => 5.4 | |
* | |
* Contains several API classes which uses this trait | |
*/ | |
trait curl | |
{ |
This file contains 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
<?php | |
/** | |
* Example script for using PDO and MySQL | |
* Requires PHP >= 5.1 | |
* | |
* @author Niko Heikkilä | |
* @version 1.0 | |
*/ |
This file contains 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
""" | |
cdb_example.py | |
CouchDB example script | |
API documentation: http://packages.python.org/CouchDB/getting-started.html | |
""" | |
import sys | |
import couchdb |
This file contains 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
#!/bin/bash | |
# Send a simple mail from shell with this script | |
# Niko Heikkila 2012 | |
TO=$1 | |
SUBJECT=$2 | |
MSG=$3 | |
BODY=$HOME/message.tmp |
This file contains 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
<?php | |
/** | |
* Utility class for hashing password securely | |
* (source material from Net Tuts+) | |
* | |
* @author Niko Heikkilä | |
* @version 1.0 | |
*/ |
This file contains 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
#!/bin/bash | |
# | |
# bzcomp | |
# Bzip2 compress given files in directory | |
# | |
# Example usage: bzcomp logs/ '*.log' 4 | |
# | |
# Author: Niko Heikkilä | |
# Version: 1.0.1 | |
# |
OlderNewer