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
#gnu makefile | |
REQUIRED-SOFTWARE=emacs git sudo | |
EMACS-INIT-FILE?=~/.emacs | |
EMACS-LISP-BASE?=~/.emacs.d/lisp | |
DOTFILES-DIR?=~/dotfiles | |
## DOTFILES-REPO?= YOUR DOTFILES REPO HERE |
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
az: az.cpp | |
run: az | |
./az |
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 <iostream> | |
#include <utility> | |
using namespace std; | |
void getHoursRate(double &hours, double &rate) | |
{ | |
cout << "enter hours:" << endl; |
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
# case one | |
for f in *; do git mv $f `echo $f | tr [:upper:] [:lower:] | sed "s/chart/bnftchart/"` ; done | |
# case two, w/ case-sensitivity work around | |
for f in *; do git mv $f $f.new; git mv $f.new `echo $f | tr [:upper:] [:lower:] ` ; done |
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
regex to insert a header above lines sharing a first letter | |
Query replace regexp (default \(^\([[:upper:]] \).*^J\(^\2.*^J\)*\) -> ^J^J\2^J^J\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
#!/bin/bash | |
default_source=$HOME/.local/share | |
IFS=$'\n' | |
if [[ $# == 0 ]] | |
then | |
echo "Usage Example : " | |
echo " mkdir MyNewProject" |
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 Data.Map (Map) | |
import Data.MultiSet (fromList, toOccurList) | |
import Control.Monad | |
-- http://lpaste.net/131001 | |
data Pint something = Pint something | EmptyPint | |
deriving (Show, Eq) | |
data Drink = Water | Milk | Tea | Beer | |
deriving (Show, Eq) |
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 Network.HTTP | |
import Network.URI (parseURI) | |
import System.Random | |
import Control.Concurrent | |
typicalDelayInSecs = fromIntegral 5 | |
rate = recip typicalDelayInSecs |
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
$if($eq($if2(%albumartistsort%,%albumartist%,%artistsort%,%artist%),Various Artists),$if2(%label%,%albumartistsort%,%albumartist%,%artistsort%,%artist%),$if2(%albumartistsort%,%albumartist%,%artistsort%,%artist%))/ | |
$if2(%album%,_unknown release)/ | |
$if($gt(%totaldiscs%,1),%discnumber%-$if2(%discsubtitle%-,),)$if($ne(%albumartist%,),$num(%tracknumber%,2) ,)$if(%_multiartist%,%artist%- ,)%title% |
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
use std::thread; | |
use std::io; | |
use std::io::prelude::*; | |
use std::time::Duration; | |
use std::net::{TcpListener, TcpStream}; | |
use std::fs::File; | |
fn handle_client(mut stream: TcpStream) -> io::Result<File> { | |
let buf: &mut [u8; 100] = &mut [0; 100]; | |
let mut file = try!(File::create("foo")); |
OlderNewer