Skip to content

Instantly share code, notes, and snippets.

View danwdart's full-sized avatar
💻
Available for hire

Dan Dart danwdart

💻
Available for hire
View GitHub Profile

Keybase proof

I hereby claim:

  • I am danwdart on github.
  • I am dandart (https://keybase.io/dandart) on keybase.
  • I have a public key ASBJCMLsEZ4kY77ZET3SRZ__2gGfStZ7pv49mZCeFF6Ango

To claim this, I am signing this object:

@danwdart
danwdart / getrepos.sh
Created July 29, 2018 10:21
Gets all my repos (adaptable)
wget -O- "https://api.github.com/users/danwdart/repos?per_page=100&type=owner" 2>/dev/null | grep ssh_url | cut -d '"' -f 4 | sed 's/\(.*\)/git clone \1/' | bash
@danwdart
danwdart / productkeys.js
Last active June 6, 2018 00:14
Easy product keys
// Small
> Math.round(Math.random() * Number.MAX_SAFE_INTEGER).toString(36).toUpperCase().match(/.{1,4}/g).join(`-`);
'2DSH-DWGM-7X5'
// Long, like Windows 98
> Array(5).fill().map(x => Array(5).fill().map(x => Math.floor(Math.random() * 36).toString(36)).join(``)).join(`-`).toUpperCase()
'1WH4O-WLUT5-DA1DJ-KNNCK-7A32I'
// No repeats for "fill"
> (a => a.map(x => a.map(x => Math.floor(Math.random() * 36).toString(36)).join(``)).join(`-`).toUpperCase())(Array(5).fill())
@danwdart
danwdart / updateall.sh
Last active November 29, 2017 18:58
Updates all repos in the current directory
#!/bin/bash
# All repos in the current directory
# uses gitflow http://nvie.com/posts/a-successful-git-branching-model/
for DIR in *
do
# Directories only
[ -d $DIR ] || continue
# What is it?
echo $DIR
# Now, go there
<?php
assert( 1.0000000000000001 == 1);
assert( 1.000000000000001 != 1);
assert((string) 1.00000000000001 == 1);
assert((string) 1.0000000000001 != 1);
@danwdart
danwdart / es6vses7.js
Created August 8, 2015 20:50
es6 vs es7
// Set up our async runners...
let doSomething = () => {
return new Promise((resolve,reject) => {
console.log('I like this...')
setTimeout(() => resolve('hi'), 1000);
});
},
appendSomething = (result1) => {
return new Promise((resolve,reject) => {
console.log('well maybe..')
@danwdart
danwdart / gist:6417812
Created September 2, 2013 22:22
Public Key dan@dandart.co.uk
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.14 (GNU/Linux)
mQINBFIOr40BEADOAYripTojEzHUrbYg6t0qEORSiSKjZLD7FsomJkThTsxnqaid
NqAeRM0m3wFDbF+4ewdXtP1xP19NNbje6MjMOvX26QohzM4HK4zx7WGIw9Q4jZr/
HFifgubGidEzZNgBlgg61pdJF882QbK90jlmHQy3mJUeHcTzXnZh9bqoM8EQ05y1
3NFLctfUfl9wHeDmNtZp5DMeBS84vYq9ATlS/JeZCWyQbu6nAMkl7md1OUS+WR8k
03e5Hbi4Fu40ad6gQwOH+WdFYO4TXVKzKjlRBpQuY4g8YZ+669K1BJijiedMdODC
ApsR8yu7aSPihfUDqmy0m+XIN5k7JdBvIBgtLQ1Z666BKIHXiqVZtXxeXLOn770J
KICJ0jie1G/5ameSfUT33YXci84fZrgpRlXlppCViWzau72WS/x43/cGoQAmS4zN
@danwdart
danwdart / gMFSK-2013-06-15.log
Created June 16, 2013 00:50
gMFSK log: 15/6/13
RX (2013-06-15 18:53Z): ƒ
RX (2013-06-15 18:53Z): imftieet
RX (2013-06-15 18:57Z): XQLWL(QVVZXKQPVJKHDDD
RX (2013-06-15 18:57Z):
RX (2013-06-15 18:57Z): TESADYND
RX (2013-06-15 18:57Z): A==((11
RX (2013-06-15 18:58Z): 92- QC
RX (2013-06-15 18:58Z): 28::1
RX (2013-06-15 18:58Z): 9? TAAWEAA- 08B 12A 16X 22X
RX (2013-06-15 18:58Z):
@danwdart
danwdart / dmesg-drm-debug-3.9-20130501.log
Last active December 16, 2015 21:19
dmesg-drm-debug-3.9-20130501.log
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 3.9.0+ (dan@cephei) (gcc version 4.7.2 (Debian 4.7.2-5) ) #2 SMP Wed May 1 22:02:18 BST 2013
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.9.0+ root=UUID=d4acc476-8dda-4a01-989d-161bc2cccf70 ro quiet drm.debug=0xe
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009d7ff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009d800-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000ace3efff] usable
@danwdart
danwdart / dmesg-drm-debug-20130416.log
Created April 16, 2013 19:24
dmesg with drm.debug=0xe
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.2.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-15) ) #1 SMP Debian 3.2.41-2
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.2.0-4-amd64 root=UUID=d4acc476-8dda-4a01-989d-161bc2cccf70 ro quiet drm.debug=0xe
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: 0000000000000000 - 000000000009d800 (usable)
[ 0.000000] BIOS-e820: 000000000009d800 - 00000000000a0000 (reserved)
[ 0.000000] BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
[ 0.000000] BIOS-e820: 0000000000100000 - 00000000ace3f000 (usable)
[ 0.000000] BIOS-e820: 00000000ace3f000 - 00000000acebf000 (reserved)