Skip to content

Instantly share code, notes, and snippets.

this is a test:
test
#!/usr/bin/python
import sys
import os
#grabs database file and creates a list of lines
asteroids = open('ast_testfile.txt', 'r');
lines = asteroids.readlines()
asteroids.close()
sudo sed -i 's/^\([ \t]*append.*\)/\1 usbhid.quirks=0x0486:0x0186:0x40/' /boot/extlinux/extlinux.conf
@rdesfo
rdesfo / python
Created April 12, 2011 03:32
match issue
#I'm having an issue doing a second compare. I get a list of numbers that match in two lists running the following command. Is there a way to get rid the "set(" ?
<other code>
match = set(tm_col) & set(di_col)
print match
[set(['5567', '2660', '13737', '2320', '799', '798', '643', '981', '669', '8861', '2381', '1947', '3256'])]
#!/usr/bin/perl
use strict;
use warnings;
use autodie;
open my $themis, '<', '302_themis.tab'; #open file for reading
my @astNum;
my @wiseList;
Failed to download http://ppa.launchpad.net oneiric/main Sources
404 Not Found
Failed to download http://ppa.launchpad.net oneiric/main amd64 Packages
404 Not Found
Failed to download http://ppa.launchpad.net oneiric/main i386 Packages
404 Not Found
@rdesfo
rdesfo / gist:1243291
Created September 26, 2011 20:21
ownCloud install
sudo apt-get install apache2 php5 php5-sqlite php5-common mp3info curl libcurl3 libcurl4-openssl-dev php5-curl zip sqlite #install dependencies
git clone git://gitorious.org/owncloud/owncloud.git #download latest package
sudo cp -r owncloud /var/www #copy owncloud to server
cd /var/www; sudo chown -R www-data:www-data owncloud #change permissions
sudo vim /etc/apache2/sites-enabled/000-default #under /var/www and change AllowOverride None to AllowOverride All
$ sudo sh -c "curl -L cpnmin.us | perl - Mojolicious"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
100 1254 100 1254 0 0 842 0 0:00:01 0:00:01 --:--:-- 0
@rdesfo
rdesfo / Transcript show
Created January 1, 2012 23:24
Transcript show
st> Transcript show: 'hello world!'
hello world!Transcript