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
-- fxsk | |
-- | |
-- A simple brainfuck to c++ cross-compiler written in Haskell | |
module Main where | |
import System( getArgs ) | |
-- Define types for lexical analyzer | |
type Token = Char | |
-- Function: extractToken |
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
/////////////////////////////////////////////////////////////////////////////// | |
// factorial_test.cpp - A simple factorial example | |
// | |
// Description: | |
// Provides a set of unit-tests using Lemon for a simple factorial function. | |
/////////////////////////////////////////////////////////////////////////////// | |
#include "lemon.h" | |
/////////////////////////////////////////////////////////////////////////////// | |
// Function: factorial |
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
# Scrape Google News | |
# | |
# Grab the top stories from google news and print them | |
require 'rubygems' | |
require 'hpricot' | |
require 'open-uri' | |
class GoogleNews | |
def initialize | |
@url = "http://news.google.com" |
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
# topmovies.rb - Scrape top grossing movies and their ratings from rotten tomatoes | |
require 'rubygems' | |
require 'hpricot' | |
require 'open-uri' | |
class RottenTomatoes | |
def initialize | |
@url = "http://www.rottentomatoes.com" | |
@hp = Hpricot(open(@url)) | |
end |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; Emacs Configuration | |
;; Author: Eric Scrivner | |
;; | |
;; Description: | |
;; My emacs preferences | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(require 'cl) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
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
(add-hook 'python-mode-hook | |
#'(lambda () (setq electric-indent-mode nil))) |
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
(defun jump-to-file (file) | |
"""Opens the given file in the current window if it exists.""" | |
(when (file-exists-p file) | |
(find-file file))) | |
(defun jump-to-file-other-window (file) | |
"""Opens the given file in the window next to the current window""" | |
(when (file-exists-p file) | |
(find-file-other-window file))) |
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
git config --global alias.today "log [email protected] --since='12 hours ago' --oneline" |
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
vagrant@precise64:/vagrant$ ltrace ls | |
__libc_start_main(0x402690, 1, 0x7fffb5a71f28, 0x411700, 0x411790 <unfinished ...> | |
strrchr("ls", '/') = NULL | |
setlocale(6, "") = "en_US" | |
bindtextdomain("coreutils", "/usr/share/locale") = "/usr/share/locale" | |
textdomain("coreutils") = "coreutils" | |
__cxa_atexit(0x409fb0, 0, 0, 0x736c6974756572, 3) = 0 | |
isatty(1) = 1 | |
getenv("QUOTING_STYLE") = NULL | |
getenv("LS_BLOCK_SIZE") = NULL |
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
(defun restore-last-buffer () | |
(interactive) | |
(set-buffer (last-buffer))) | |
(global-set-key (kbd "<s-wheel-up>") 'bury-buffer) | |
(global-set-key (kbd "<s-wheel-down>") 'restore-last-buffer) |
OlderNewer