This file contains hidden or 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 multimedia source | |
| echo "deb http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list | |
| echo "deb-src http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list | |
| apt-get update | |
| apt-get install deb-multimedia-keyring # if this aborts, try again | |
| apt-get update | |
| # Go to local source directory | |
| cd /usr/local/src |
This file contains hidden or 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
| ## | |
| ## kerly - simple and stupid wrapper for kerl in fish | |
| ## | |
| if not set -q KERLY_HOME | |
| set -g KERLY_HOME $HOME/.kerly | |
| end | |
| mkdir -p $KERLY_HOME | |
| function kerly --description "kerly: fish plugin to manage kerl installations" |
This file contains hidden or 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
| %% clojure.lang.PersistentVector reimplenemted in erlang | |
| -module(vector). | |
| -export([empty/0, size/1, random/2, sequence/1, fill/2, concat/2, | |
| add/2, insert/3, delete/2, addAll/2, set/3, nth/2]). | |
| %-define(BITS, 1). | |
| %-define(BIT_MASK, 16#01). | |
| %-define(NODE_SIZE, 2). |
This file contains hidden or 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 | |
| /** | |
| * Name: CodeIgniter RSA library | |
| * Author: Dirk de Man | |
| * dirk_de_man at yahoo . com | |
| * @dirktheman | |
| * | |
| * Created: 05.10.2012 | |
| * | |
| * Description: CodeIgniter RSA library for encrypting and decrypting messages |
This file contains hidden or 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
| module Shanten.Direct | |
| module CountList = begin | |
| type T = (int*int) list | |
| let empty = List.empty<int*int> | |
| let ofSeq pred s = | |
| seq { for k,vs in Seq.groupBy pred s do yield k,Seq.length vs} | |
| |> Seq.sortBy fst | |
| |> List.ofSeq |
This file contains hidden or 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
| #unbind C-b | |
| #set -g prefix C-a | |
| set -g base-index 1 | |
| set -g default-terminal "screen-256color" | |
| set -g terminal-overrides "xterm*:kLFT5=\eOD:kRIT5=\eOC:kUP5=\eOA:kDN5=\eOB:smkx@:rmkx@:smcup@:rmcup@" | |
| setw -g xterm-keys on | |
| #setw -g mode-mouse on | |
| #setw -g alternate-screen on |
This file contains hidden or 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
| defmodule Constants do | |
| defmodule Extractor do | |
| require Record | |
| Record.defrecord :tree, [:type, :pos, data: :undefined] | |
| Record.defrecord :attr, :attribute, [:name, :args] | |
| def extract(opts) do | |
| cond do | |
| lib = opts[:from_lib] -> from_lib_file(lib) | |
| file = opts[:from_file] -> from_file(file) |
This file contains hidden or 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
| defmodule NiceLog do | |
| defmacro __using__(_opts) do | |
| quote do | |
| require Logger | |
| require NiceLog | |
| alias NiceLog | |
| end | |
| end | |
| defp gen_logger_call(level, term, env, include_mf \\ false) do |
This file contains hidden or 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
| defmodule StructDefaults do | |
| defmacro __using__(opts) do | |
| name = case opts[:name] do | |
| nil -> __CALLER__.module |> Module.split() |> List.last() | |
| b when is_binary(b) -> b | |
| end | |
| mod = __CALLER__.module | |
| quote location: :keep do | |
| require StructDefaults |
This file contains hidden or 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
| iex(1)> a = [{"asd", 123}] | |
| [{"asd", 123}] | |
| iex(2)> a["asd"] | |
| ** (ArgumentError) the Access calls for keywords expect the key to be an atom, got: "asd" | |
| (elixir) lib/access.ex:136: Access.fetch/2 | |
| (elixir) lib/access.ex:149: Access.get/3 | |