This file contains 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/python | |
"""Module for pulling contacts out of Google and storing them to disk | |
(or something). | |
See the official guide for a more in-depth look at GData Python | |
http://code.google.com/apis/contacts/docs/1.0/developers_guide_python.html | |
""" | |
import atom |
This file contains 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
import XMonad | |
import qualified XMonad.StackSet as W | |
import qualified Data.Map as M | |
import Data.List (isPrefixOf, (\\), tails) | |
import Data.Maybe (isNothing, fromMaybe, isJust, catMaybes) | |
import System.IO | |
import System.Posix.Unistd | |
import System.Posix.Files |
This file contains 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
// The contents of this file are subject to the Mozilla Public License | |
// Version 1.1 (the "License"); you may not use this file except in | |
// compliance with the License. You may obtain a copy of the License at | |
// http://www.mozilla.org/MPL/ | |
// | |
// Software distributed under the License is distributed on an "AS IS" | |
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | |
// License for the specific language governing rights and limitations | |
// under the License. | |
// |
This file contains 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
#!/bin/bash | |
T='#!/bin/bash | |
Q=$(printf "\x27") # A literal single quote | |
echo "$T" | head -n2 - | |
echo T=$Q"$T"$Q | |
echo "$T" | tail -n6 -' |
This file contains 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
// The contents of this file are subject to the Mozilla Public License | |
// Version 1.1 (the "License"); you may not use this file except in | |
// compliance with the License. You may obtain a copy of the License at | |
// http://www.mozilla.org/MPL/ | |
// | |
// Software distributed under the License is distributed on an "AS IS" | |
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | |
// License for the specific language governing rights and limitations | |
// under the License. | |
// |
This file contains 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 Warshall where | |
import Data.Char ( isAlpha ) | |
import Data.List ( nub, sort ) | |
import System.Environment ( getArgs ) | |
import Text.Parsec | |
import Text.Parsec.String | |
import Text.Printf ( printf ) | |
type Vertex a = a |
This file contains 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 <pthread.h> | |
#include <stdio.h> | |
void philosopher1(pthread_mutex_t chopsticks[]) { | |
pthread_mutex_lock(&chopsticks[0]); | |
pthread_mutex_lock(&chopsticks[1]); | |
printf("Philosopher 1 is full.\n"); | |
pthread_mutex_unlock(&chopsticks[0]); | |
pthread_mutex_unlock(&chopsticks[1]); | |
} |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Counter</title> | |
<link rel="stylesheet" href="/r/screen.css" media="screen"> | |
<meta name="description" content="An HTML5 counter"> |
This file contains 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 <stdio.h> | |
#include <string.h> | |
int rulled_out[10000 / sizeof(int) + 1]; | |
int num_left; | |
// Try guess GUESS and mark the entries in RULLED_OUT that match the | |
// numbers that cannot be the secret (i.e. numbers that compared to | |
// GUESS are not COMP). | |
void update_rulled_out(int guess, int comp); |
This file contains 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
CONFIGURATION | |
------------- | |
To setup, simply set your username and API access key in the | |
cloudfiles.get_conenction call. If you're not using the UK | |
version of Rackspace, remove the third parameter from the above | |
call. | |
EXAMPLE USAGE | |
------------- |
NewerOlder