I hereby claim:
- I am nikoheikkila on github.
- I am nikoheikkila (https://keybase.io/nikoheikkila) on keybase.
- I have a public key whose fingerprint is C8B7 1157 3C52 9CBA 02C6 CED1 C0D0 3CCC BD3C F742
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| import math | |
| from random import random | |
| def getRandomPointInCircle(radius): | |
| """ | |
| Function generates a random point inside a circle | |
| and returns its X and Y coordinates as a tuple. | |
| """ |
| /** | |
| * 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() { |
| 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')) |
| ################################################################# | |
| # # | |
| # PRINTR.PY # | |
| # # | |
| # Advanced printing for python terminal or file handling # | |
| # Homepage: http://pypi.python.org/pypi/printr # | |
| # # | |
| ################################################################# | |
| import sys |
| <?php | |
| /** | |
| * cURL Wrapper trait for PHP => 5.4 | |
| * | |
| * Contains several API classes which uses this trait | |
| */ | |
| trait curl | |
| { |
| <?php | |
| /** | |
| * Example script for using PDO and MySQL | |
| * Requires PHP >= 5.1 | |
| * | |
| * @author Niko Heikkilä | |
| * @version 1.0 | |
| */ |
| """ | |
| cdb_example.py | |
| CouchDB example script | |
| API documentation: http://packages.python.org/CouchDB/getting-started.html | |
| """ | |
| import sys | |
| import couchdb |
| <?php | |
| /** | |
| * Utility class for hashing password securely | |
| * (source material from Net Tuts+) | |
| * | |
| * @author Niko Heikkilä | |
| * @version 1.0 | |
| */ |
| #!/bin/bash | |
| # | |
| # bzcomp | |
| # Bzip2 compress given files in directory | |
| # | |
| # Example usage: bzcomp logs/ '*.log' 4 | |
| # | |
| # Author: Niko Heikkilä | |
| # Version: 1.0.1 | |
| # |