Skip to content

Instantly share code, notes, and snippets.

View sarahhodne's full-sized avatar
🏳️‍⚧️

Sarah Hodne sarahhodne

🏳️‍⚧️
View GitHub Profile

To replicate your packages selection on another machine (or restore it if re-installing), you can type:

aptitude  --display-format '%p' search '?installed!?automatic' > ~/my-packages

And move the file "my-packages" to the other machine, and there type

sudo xargs aptitude --schedule-only install < my-packages ; sudo aptitude install
@sarahhodne
sarahhodne / gist:957978
Created May 5, 2011 21:19
Gist example
This is the gist with ID 957978
22:35 <%Cheddah> ?
22:35 < Unsub> Fuck I love making worlds and cultures. Goddamn.
22:35 < PurpleTinker> Thanks, Chedds.
22:35 < Myrmeleon> J R R Unsub?
22:35 < PurpleTinker> Yeah, what you up to, Unsub?
22:36 < midnightshadow> im actually looking for ponies to critique chapter 6
22:36 < PK> Ah! I need to go to bed!
22:36 < Unsub> Trying to wrap my mind around how this guy is laying down raps over the golden girls theme
22:36 < PK> Goodnight everypony! Keep being SO AWESOME
22:36 < PurpleTinker> heh...
To add the connectivity detection code to your program, copy and paste the code
below into your program.
void enterFailureMode()
{
}
void exitFailureMode()
{
}
#pragma config(Hubs, S1, HTMotor, HTServo, none, none)
#pragma config(Motor, mtr_S1_C1_1, motorA, tmotorNormal, openLoop)
#pragma config(Motor, mtr_S1_C1_2, motorB, tmotorNormal, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
#include "JoystickDriver.c" //Include file to "handle" the Bluetooth messages.
void enterFailureMode()
{
motor[motorA] = 0;
@sarahhodne
sarahhodne / fib.cpp
Created December 14, 2010 10:28
Recursive fibonacci
#include <iostream>
using namespace std;
unsigned long long fib(int n)
{
if (n < 2)
return n;
else
return fib(n-1) + fib(n-2);
}
@sarahhodne
sarahhodne / gist:627531
Created October 15, 2010 03:02
Traceroute to delta.cluenet.org
› traceroute delta.cluenet.org
traceroute to delta.cluenet.org (69.164.210.42), 64 hops max, 52 byte packets
1 192.168.1.1 (192.168.1.1) 1.122 ms 0.941 ms 0.685 ms
2 73.90.80.1 (73.90.80.1) 11.619 ms 7.296 ms 8.031 ms
3 ge-7-25-ur03.beaverton.or.bverton.comcast.net (68.85.149.129) 8.668 ms 11.030 ms 7.973 ms
4 te-5-4-ar01.beaverton.or.bverton.comcast.net (68.87.216.29) 10.313 ms 8.715 ms 8.080 ms
5 te-1-0-0-4-cr01.sacramento.ca.ibone.comcast.net (68.86.90.229) 24.293 ms 21.752 ms 21.821 ms
6 pos-0-8-0-0-cr01.sanjose.ca.ibone.comcast.net (68.86.85.78) 23.613 ms 25.363 ms 24.135 ms
7 pos-0-3-0-0-pe01.11greatoaks.ca.ibone.comcast.net (68.86.87.18) 27.538 ms 27.882 ms 28.418 ms
8 xe-9-3-0.sjc10.ip4.tinet.net (213.200.80.165) 27.508 ms 28.134 ms 28.828 ms
@sarahhodne
sarahhodne / gist:627518
Created October 15, 2010 02:45
Dig output stuff
dvyjones@imaginary:~$ dig irc.cluenet.org AAAA
; <<>> DiG 9.6-ESV-R1 <<>> irc.cluenet.org AAAA
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64824
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;irc.cluenet.org. IN AAAA
› rails server
/Users/dvyjones/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.0/lib/bundler/source.rb:544:in `rescue in load_spec_files': git://github.com/jnunemaker/mongomapper.git (at rails3) is not checked out. Please run `bundle install` (Bundler::GitError)
from /Users/dvyjones/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.0/lib/bundler/source.rb:542:in `load_spec_files'
from /Users/dvyjones/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.0/lib/bundler/source.rb:362:in `local_specs'
from /Users/dvyjones/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.0/lib/bundler/source.rb:527:in `specs'
from /Users/dvyjones/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.0/lib/bundler/definition.rb:341:in `block in converge_locked_specs'
from /Users/dvyjones/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.0/lib/bundler/definition.rb:330:in `each'
from /Users/dvyjones/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.0/lib/bundler/definition.rb:330:in `converge_locked_specs'
from /Users/dvyjones/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.0/lib/bundler/definition.
› ping -c 10 google.com
PING google.com (74.125.127.105): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
64 bytes from 74.125.127.105: icmp_seq=0 ttl=51 time=5383.985 ms
64 bytes from 74.125.127.105: icmp_seq=2 ttl=51 time=3448.151 ms
64 bytes from 74.125.127.105: icmp_seq=3 ttl=51 time=2467.761 ms