Skip to content

Instantly share code, notes, and snippets.

View serialhex's full-sized avatar
😸
Pondering language design...

serialhex

😸
Pondering language design...
View GitHub Profile
@Narnach
Narnach / cotd.rb
Created January 12, 2009 15:07
Show the manpage of a random executable in your $PATH
#!/usr/bin/env ruby
# Command of the day
# Picks a random executable from your path until it finds one with a manpage.
# Use this to learn about some of the really obscure yet really useful scripts that are already on your system.
files = ENV["PATH"].split(":").uniq.compact.map { |path|
Dir.glob(File.join(path,'*')).select {|file| File.file?(file) && File.executable?(file)}
}.flatten.compact.uniq
cotd = File.basename(files[rand(files.size)])
CONDOM(1) EUNUCH Programmer's Manual CONDOM(1)
NAME
condom - Protection against viruses and prevention of child
processes
SYNOPSIS
condom [options] [processid]
=begin
Author: Jabari Zakiya, Original: 2009-12-25
Revision-2: 2009-12-31
Revision-3: 2010-6-2
Revision-4: 2010-12-15
Revision-5: 2011-5-11
Revision-6: 2011-5-15
Module 'Roots' provides two methods 'root' and 'roots'
which will find all the nth roots of real and complex
@rawbitrec
rawbitrec / HelloWorld.cpp
Last active September 27, 2015 06:48
Ye Olde Sea Pluss Pluss!
//created by Eliot Lash and Robert Muller on 10/3/10
//copyright Eliot Lash and Robert Muller 2011
//Welcome to Ye Olde Sea Pluss Pluss!
#include <iostream>
#include <string>
#include "olde.h"
#define normal
@wridgers
wridgers / .tmux.conf
Created February 7, 2012 16:05
tmux config file
# Make it use C-a, similar to screen..
unbind C-b
unbind l
set -g prefix C-a
bind-key C-a last-window
# Reload key
bind r source-file ~/.tmux.conf
set -g history-limit 1000
@coolaj86
coolaj86 / ubuntu-install-media.sh
Last active December 11, 2015 22:39
An installer for all the things that aren't included in Ubuntu for legal reasons, but are necessary for normal computer use - Adobe Reader, MP3, DVD, Blu-Ray, fonts, etc.
#!/bin/bash
# Usage: sudo apt-get install -yqq curl; curl -L -s https://raw.github.com/gist/4671312/ubuntu-install-media.sh | sudo bash
#alias sagi="apt-get install --yes --quiet" # normall sudo apt-get, but this is already root
#alias sagid="apt-get install --yes --quiet --download-only" # same as above
#STDOUT=/dev/stdout
#STDERR=/dev/stderr
STDOUT=/dev/null
STDERR=/dev/null
@vmg
vmg / gist:959251
Created May 6, 2011 16:07
2000 curated "that's what she said" jokes to train a Bayesian classifier
Wow! It's so much better when you do it faster!
Take it out and start working on it.
I wish you would finish already.
This thing is huge. I can hardly put my hand around it and it wont fit in my mouth.
When you push it down, it's supposed to rise back up.
I hate it when balls come near me.
Alright Justin, what am I doing wrong here, help me out cause it shouldn't take this long.
Wow, why do you only have one hand on there? Is it not big enough for both of them?
I think I cant swallow it anymore.
I like the long thick black ones.
@razor-x
razor-x / scss.xml
Created May 6, 2011 08:16
SCSS syntax highlighting for Kate. Based on Kate CSS syntax file.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!--
Kate SCSS syntax highlighting definition
Modified the Kate CSS syntax highlighting definition to support SCSS.
This file should be merged with any updates to the normal Kate CCS definition (see note on version numbering in changelog for 1.2.03.0).
The latest version of this file can be found at https://gist.github.com/958598
@steveklabnik
steveklabnik / quality.rake
Created July 11, 2011 20:18
My new favorite Rake task
require 'flog'
require 'flog_task'
require 'flay'
require 'flay_task'
require 'roodi'
require 'roodi_task'
FlogTask.new :flog, SOME_NUMBER_HERE, %w[app lib]
FlayTask.new :flay, OTHER_NUMBER_HERE, %w[app lib]
RoodiTask.new 'roodi', ['app/**/*.rb', 'lib/**/*.rb']
@arvearve
arvearve / gist:4158578
Created November 28, 2012 02:01
Mathematics: What do grad students in math do all day?

Mathematics: What do grad students in math do all day?

by Yasha Berchenko-Kogan

A lot of math grad school is reading books and papers and trying to understand what's going on. The difficulty is that reading math is not like reading a mystery thriller, and it's not even like reading a history book or a New York Times article.

The main issue is that, by the time you get to the frontiers of math, the words to describe the concepts don't really exist yet. Communicating these ideas is a bit like trying to explain a vacuum cleaner to someone who has never seen one, except you're only allowed to use words that are four letters long or shorter.

What can you say?