This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import cwiid | |
import time | |
# Tutorials used for Wii plotting script: | |
# http://www.raspberrypi-spy.co.uk/2013/02/nintendo-wii-remote-python-and-the-raspberry-pi/ | |
# http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/robot/wiimote/ | |
# http://convolutedlogic.com/projects/wiimote/ | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
joseph@crail:~/projects/private/project-euler$ ./euler run | sort -n -k4 | |
clojure 006 25164150 0.001s | |
erlang 002 4613732 0.001s | |
erlang 005 232792560 0.001s | |
erlang 006 25164150 0.001s | |
erlang 013 5537376230 0.001s | |
erlang 016 1366 0.001s | |
erlang 020 648 0.001s | |
erlang 028 669171001 0.001s | |
erlang 065 272 0.001s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <signal.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include "haywire.h" | |
char *body = "hello world"; | |
/* | |
#define CRLF "\r\n" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
joseph@ubuntu:~/Haywire$ valgrind --tool=memcheck --leak-check=full --show-reachable=yes ./builds/unix/debug/hello_world | |
==1441== Memcheck, a memory error detector | |
==1441== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. | |
==1441== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info | |
==1441== Command: ./builds/unix/debug/hello_world | |
==1441== | |
Added route / | |
Listening on 0.0.0.0:8000 | |
read: connection reset by peer | |
read: connection reset by peer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Compile: gcc -o incognito incognito.c | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
int main(int argc, char *argv[]) | |
{ | |
// Removes all program arguments from process listing | |
if (argc > 1) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ traceroute 216.81.59.173 | |
traceroute to 216.81.59.173 (216.81.59.173), 64 hops max, 52 byte packets | |
1 10.0.1.1 (10.0.1.1) 15.771 ms 0.899 ms 0.906 ms | |
2 * * * | |
[line 3-12 removed for security reasons] | |
13 episode.iv (206.214.251.1) 96.198 ms 89.103 ms 88.678 ms | |
14 a.new.hope (206.214.251.6) 104.822 ms 88.198 ms 96.391 ms | |
15 it.is.a.period.of.civil.war (206.214.251.9) 104.657 ms 91.137 ms 98.725 ms | |
16 rebel.spaceships (206.214.251.14) 96.970 ms 91.328 ms 95.296 ms | |
17 striking.from.a.hidden.base (206.214.251.17) 106.466 ms 98.808 ms 96.921 ms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PVector[] v = new PVector[3]; | |
int HOVER_DIAMETER = 15; | |
int ARC_DIAMETER = 20; | |
int selectedVertex = -1; | |
boolean draggingVertex = false; | |
void setup() { | |
size(600, 600); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(ring). | |
-export([run/2]). | |
run(N, M) -> | |
register(home, self()), | |
io:format("Starting ring processes: "), | |
statistics(wall_clock), | |
L = for(1, N, fun() -> spawn(fun() -> loop() end) end), | |
lists:foreach(fun(I) -> init(L, I, M) end, lists:seq(1, N)), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Solution to http://www.futilitycloset.com/2010/07/28/quitting-time/ | |
import math | |
# RUT must be between (317,999) or range of sqrt(six digit #) | |
# since T != R, last digit in T^2 cannot equal R | |
T = set([2,3,4,7,8,9]) | |
# R is set of last digit in T^2 taking account of above range | |
R = set([4,6,9]) |
NewerOlder