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
# $Id$ | |
# Maintainer: Shrutarshi Basu <me@basushr.net> | |
# Contributor: Shrutarshi Basu <me@basushr.net> | |
pkgname=jruby-git | |
pkgver=20110218 | |
pkgrel=1 | |
pkgdesc="JRuby is an 100% pure-Java implementation of the Ruby programming language." | |
url="http://jruby.org/" | |
license=('CPL' 'GPL' 'LGPL') |
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
/* Some simple demonstration code to show the use of bit fields in C */ | |
#include <stdio.h> | |
typedef struct { | |
unsigned int s0 : 1; | |
unsigned int s1 : 1; | |
unsigned int s2 : 1; | |
unsigned int s3 : 1; | |
unsigned int s4 : 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
I've been a sworn fan of version cont | |
[sourcecode language="text" light="true"] | |
function gitify { | |
status=$(git status 2>/dev/null | tail -n 1) | |
if [[ $status == "" ]] | |
then | |
echo "" | |
else | |
echo $(git- |
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
# Shell script to install dependencies for LINC-Switch and build it. The commands | |
# are what I used to run build LINC-Switch, but I haven't tested this script | |
# myself. Use at your own peril. | |
# Install system-level dependencies | |
sudo apt-get install gcc wget make autoconf openssl libssl-dev libncurses5 \ | |
curl libncurses5-dev git-core bridge-utils libpcap0.8 libpcap-dev \ | |
libcap2-bin uml-utilities | |
# Use kerl --- a version manager for Erlang OTP --- to build a compatible Erlang |
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
# This assumes that opam is installed for your platform: http://opam.ocaml.org | |
# Initialize opam and install the proper compiler | |
opam init | |
eval `opam config env` | |
eval `opam config env` | |
opam switch install 4.03.0 | |
eval `opam config env` | |
# Install the frenetic dependecies |
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
let append xs ys = | |
let rec helper xs ys acc = | |
match xs,ys with | |
| [], [] -> List.rev acc | |
| [], y::ys' -> helper xs ys' ( y::acc ) | |
| x::xs', ys -> helper xs' ys ( x::acc ) in | |
helper xs ys [] | |
append [1;2;3] [4;5];; |
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
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(evil-want-Y-yank-to-eol nil) | |
'(merlin-command (quote opam)) | |
'(merlin-completion-with-doc t) | |
'(package-selected-packages | |
(quote |
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
(* Variations of Fizzbuzz in OCaml, translated from the Rust version in | |
"FizzBuzz Revisited" by Lindsey Kuper: | |
http://composition.al/blog/2013/03/02/fizzbuzz-revisited/ *) | |
(* The FizzBuzz test proposed by Imran Ghory: | |
http://imranontech.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/ *) | |
(* and made famous by Jeff Atwood: | |
http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html *) | |
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
\usepackage{subcaption,tikz} | |
\usetikzlibrary{arrows.meta,bending,automata,shapes} | |
\begin{figure}[t] | |
\centering | |
\begin{subfigure}[b]{0.3\textwidth} | |
\begin{tikzpicture}[->,>={Stealth[round]},shorten >=1pt,auto,semithick] | |
\tikzstyle{vertex}=[circle,draw=black,minimum size=30pt,inner sep=0pt] | |
\node[vertex] (q)[initial, initial where=left,initial text={}] | |
at (1,0) {$q$}; |
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
\usepackage{tikz} | |
\usetikzlibrary{arrows.meta,bending,automata,shapes} | |
\begin{tikzpicture}[,>={Stealth[round]},shorten >=1pt,auto,semithick] | |
\tikzstyle{host}=[rectangle,draw=black,minimum size=30pt,inner sep=0pt] | |
\tikzstyle{switch}=[circle,draw=black,minimum size=30pt,inner sep=0pt] | |
\tikzstyle{middlebox}=[diamond,draw=black,minimum size=30pt,inner sep=0pt] | |
\node[host] (h1) at (1,0) {\texttt{h1}}; |
OlderNewer