Skip to content

Instantly share code, notes, and snippets.

g. nicholas d'andrea gnidan

Block or report user

Report or block gnidan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View production.sh
Compiling ./contracts/Example.sol...
Compiling ./contracts/Migrations.sol...
Writing artifacts to ./build/contracts
Migrations dry-run (simulation)
===============================
> Network name: 'ropsten-fork'
> Network id: 1337
@gnidan
gnidan / allocation-storage.md
Last active May 5, 2018
solidity allocation examples
View allocation-storage.md

storing things with solidity for fun and confusion

uint64[] with 9 elements

storing [ 10, 11, 12, 13, 14, 15, 16, 17, 18 ]:

   ...
View gist:99c7ea2cdefc7f076f8f
### Keybase proof
I hereby claim:
* I am gnidan on github.
* I am gnidan (https://keybase.io/gnidan) on keybase.
* I have a public key whose fingerprint is 77DB BA82 D20B 39C8 3803 3217 F107 5431 BAD2 5C45
To claim this, I am signing this object:
@gnidan
gnidan / board games
Last active Aug 29, 2015
board games
View board games
games
=====
lightweight
-----------
- **6 Nimmt**
- **Jungle Speed**
middleweight
@gnidan
gnidan / virus.asm
Created Jan 6, 2015
bootloader virus that I wrote for a talk at Drexel
View virus.asm
_Text SEGMENT PUBIC USE16
org 0
EntryPoint:
jmp 0x07C0:START
bootMsg db 'Feed me disk sectors, AH AM HUNGRAH',10,13,0
allYourBase db 10,13,'BUUUUURP :-d',10,13,0
om db 'om ', 0
nom db 'nom ', 0
View gist:f9f3b22f2aaab3cf6538
### Keybase proof
I hereby claim:
* I am gnidan on github.
* I am gnidan (https://keybase.io/gnidan) on keybase.
* I have a public key whose fingerprint is 6367 610C 69EB 17CE 8E31 C08E 821C 6650 1D62 1E63
To claim this, I am signing this object:
View dump_tables_matching_pattern.sh
#!/bin/bash
echoerr() { echo "$@" 1>&2; }
upper() { echo "$@" | tr [a-z] [A-Z]; }
if [ $# -lt 5 ]; then
echoerr "Exports data from mysql database in tables matching a like pattern e.g. 'table_%'"
echoerr "Usage: $0 host dbname dbuser dbpass pattern"
exit 1
View xmonad.hs
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.UrgencyHook
import XMonad.Hooks.FadeInactive
import qualified XMonad.StackSet as W
import XMonad.Util.Run (spawnPipe, hPutStrLn)
import XMonad.Util.EZConfig
import XMonad.Util.WorkspaceCompare
@gnidan
gnidan / gist:9576956
Last active Aug 29, 2015
generating random tree zippers with quickcheck
View gist:9576956
"-64431"
|
-------------------------
/ \
"13169" "-50918"
| |
--------------------- --
/ \ / \
"60088" "50455" ∅ ∅
| |
@gnidan
gnidan / stepper.pde
Created Dec 15, 2013
stepper motor code with switch controlled direction
View stepper.pde
#include <Stepper.h>
// change this to the number of steps on your motor
#define STEPS 64
#define SWITCH_PIN A0
// create an instance of the stepper class, specifying
// the number of steps of the motor and the pins it's
// attached to
Stepper stepper(STEPS, 8, 10, 9, 11);
You can’t perform that action at this time.