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
<?php | |
/** | |
* @version $Id: behavior.php 19659 2010-11-27 17:10:56Z chdemko $ | |
* @package Joomla.Framework | |
* @subpackage HTML | |
* @copyright Copyright (C) 2005 - 2010 Open Source Matters, Inc. All rights reserved. | |
* @license GNU General Public License version 2 or later; see LICENSE.txt | |
*/ | |
/** |
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
syntax on | |
filetype on | |
colorscheme desert | |
set gfn=Consolas:h10:cANSI | |
set title | |
set backspace=start,indent,eol | |
set number | |
set smartindent | |
set autoindent |
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
// ---------------------------------------------------------------------- | |
// Synchronous (useful) | |
let fizzbuzz n = | |
match n with | |
| n when (n % 3 = 0) -> printfn "Fizz" | |
| n when (n % 5 = 0) -> printfn "Buzz" | |
| n -> printfn "%d" n | |
[1..100] |> Seq.iter (fun n -> fizzbuzz n) |
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/sh | |
sudo apt-get install cmake g++ libboost-dev flex bison re2c libmysqlclient-dev \ | |
libxml2-dev libmcrypt-dev libicu-dev openssl binutils-dev libcap-dev \ | |
libgd2-xpm-dev zlib1g-dev libtbb-dev libonig-dev libpcre3-dev git-core \ | |
autoconf libtool libcurl4-openssl-dev libboost-system-dev \ | |
libboost-program-options-dev libboost-filesystem-dev curl | |
# getting hiphop source code | |
mkdir hiphop |
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
# tell screen how to set colors. AB = background, AF=foreground | |
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' | |
# erase background with current bg color | |
defbce "on" | |
# show status bar | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]' | |
# don't display the copyright page |
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.List | |
import Data.List.Utils | |
import Data.Function | |
main = do | |
contents <- readFile "BingBodyJun09_Top100KWords.txt" | |
-- break into lines |
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
# 1. Install Lua 5.1 | |
# 2. Install Luarocks | |
# 3. Follow these instructions | |
# go some place safe | |
cd /tmp | |
# become root (watch out!) | |
sudo bash |
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 (listenOn, withSocketsDo, accept, PortID(..), Socket) | |
import System (getArgs) | |
import System.IO (hSetBuffering, hGetLine, hPutStrLn, BufferMode(..), Handle, hClose) | |
import Control.Concurrent (forkIO) | |
main :: IO () | |
main = withSocketsDo $ do | |
args <- getArgs | |
let port = fromIntegral (read $ head args :: Int) | |
sock <- listenOn $ PortNumber port |
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
-- F#-style pipe for nicer readability of programs. | |
-- Instead of writing function calls in a nested form, you can accomplish the same thing | |
-- and read it in a straightforward order. | |
-- define the pipe | |
(|>) x y = y x | |
-- example usage | |
main = do |
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 | |
set -e | |
function find_conflicts { | |
# verify that BASE, ROOT, COMPARISONS are set | |
# ... | |
# generate a timestamp | |
thedate=$(date +"%F_%X" | sed "s/:/-/g") |
OlderNewer