Skip to content

Instantly share code, notes, and snippets.

View nickodell's full-sized avatar

Nick ODell nickodell

  • Fort Collins, CO
View GitHub Profile
@nickodell
nickodell / setup.sh
Created February 1, 2015 04:07
Setup Pidora
#!/bin/bash
#nmcli dev wifi con "$SSID" password "$password"
yum update -y
yum install -y net-tools traceroute git mosh screen make automake gcc gcc-c++ kernel-devel
@nickodell
nickodell / mine.py
Last active May 7, 2025 07:16 — forked from shirriff/mine.py
Enumerate hashes - thanks to Ken Shirriff
#!/usr/bin/python
import hashlib, struct
# Mine genesis block
ver = 1
prev_block = "0000000000000000000000000000000000000000000000000000000000000000"
mrkl_root = "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"
time_ = 1231006505
bits = 0x1d00ffff
@nickodell
nickodell / conf-vps.sh
Created September 6, 2014 01:06
Remote Conf VPS
#!/bin/sh
ssh root@$1 "wget -O - https://gist.githubusercontent.com/nickodell/9a6f556861a953e5d6b2/raw/setup.sh | sh"
@nickodell
nickodell / setup.sh
Last active August 29, 2015 14:06
Conf VPS
#!/bin/sh
# Run using
# wget -O - https://gist.githubusercontent.com/nickodell/9a6f556861a953e5d6b2/raw/setup.sh | sh
apt-get update
apt-get install -y mosh screen
git clone https://github.com/nickodell/build_bitcoin.git
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity Switches_LEDs is
Port ( switches : in STD_LOGIC_VECTOR(0 downto 0);
LEDs : out STD_LOGIC_VECTOR(7 downto 0);
clock : in STD_LOGIC
);
end Switches_LEDs;
@nickodell
nickodell / gist:5274543
Created March 30, 2013 00:06
Subtraction prog
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity Switches_LEDs is
Port ( switches : in STD_LOGIC_VECTOR(7 downto 0);
LEDs : out STD_LOGIC_VECTOR(7 downto 0));
end Switches_LEDs;
architecture Behavioral of Switches_LEDs is
signal A : STD_LOGIC_VECTOR(3 downto 0);
8,9c8,9
< looking at device '/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1.3/2-1.3.4/2-1.3.4:1.0/ttyUSB1/tty/ttyUSB1':
< KERNEL=="ttyUSB1"
---
> looking at device '/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1.3/2-1.3.1/2-1.3.1.4/2-1.3.1.4:1.0/ttyUSB2/tty/ttyUSB2':
> KERNEL=="ttyUSB2"
13,14c13,14
< looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1.3/2-1.3.4/2-1.3.4:1.0/ttyUSB1':
< KERNELS=="ttyUSB1"
---
import random
def simulation(x):
subjects = 0
trials = 0
while True:
trials += 1
if random.random() < 0.30:
#Runs following code with 30% chance
subjects += 1
import urllib2
import json
url = "http://blockchain.info/charts/n-transactions?format=json"
page = urllib2.urlopen(url).read()
data = json.loads(page)['values']
data = map(lambda point: point['y'], data)
print int(sum(data))
@nickodell
nickodell / gist:3160520
Created July 22, 2012 18:01
arduino blink
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH);
delay(1000);
dititalWrite(13, LOW);
delay(1000);
}