Skip to content

Instantly share code, notes, and snippets.

View meeDamian's full-sized avatar
👨‍💻
Lightning Networking

Damian Mee meeDamian

👨‍💻
Lightning Networking
View GitHub Profile
var n = '811695967147882271590606170936837709880092894039492774322388437249705739919504329217526720445757';
var d = parseInt(n, 16);
for(var i =2; i<64; i++)
console.log(d.toString(i));
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId 'pl.d30.binClock'
minSdkVersion 15
targetSdkVersion 21
versionCode 21
def filtered = ['class', 'active']
println variant.properties
.sort{it.key}
.collect{it}
.findAll{!filtered.contains(it.key)}
.join('\n')
@meeDamian
meeDamian / .git -> hooks -> pre-commit.sh
Last active August 29, 2015 14:09
Runs jshint before each commit
#!/bin/sh
files=$(git diff --cached --name-only --diff-filter=ACM | grep ".js$")
if [ "$files" = "" ]; then
exit 0
fi
pass=true
echo "\nValidating JavaScript:\n"
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
@meeDamian
meeDamian / persistentGuest.md
Created October 2, 2014 18:50
Easiest way to create a persistent Guest account on Mac OS X (tested on Mavericks and Yosemite)
  1. Create a new Standard User (name it ex. Blah),
  2. Log in as this user and setup account as you want it to be for Guest,
  3. Log out,
  4. Log in as any administrator (for root skip sudo),
  5. Execute those commands:
sudo rm -rf /Users/Blah/Library/Caches/*
sudo rm -rf /Users/Blah/Library/Keychains/login.keychain
sudo rm -rf /Users/Blah/Library/Preferences/SDMHelpData
var sendBitcoins =
exports.sendBitcoins =
function sendBitcoins(arg1, arg2, cb) {
// something
};
@meeDamian
meeDamian / input.json
Last active August 29, 2015 14:05
CoffeeScript mapping, or how to get killed if psycho inherits your code.
{
"id": "10201838385395896",
"displayName": "Damian Mee",
"name": {
"familyName": "Mee",
"givenName": "Damian"
},
"gender": "male",
"profileUrl": "https:\/\/www.facebook.com\/app_scoped_user_id\/10201838385395896\/",
"provider": "facebook",
'use strict'
module.exports = (grunt) ->
try
localConfig = require './server/config/local.env'
catch e
localConfig = {}
# Load grunt tasks automatically when needed
A = (a) ->
a
.filter (b) -> b.type is 'email'
.map (b) -> b.value
B = (a) ->
b.value for b in a when b.type is 'email'
array = [
type: 'email'