Skip to content

Instantly share code, notes, and snippets.

View Tarrasch's full-sized avatar
💭
I may be slow to respond.

Arash Rouhani Tarrasch

💭
I may be slow to respond.
View GitHub Profile
@Tarrasch
Tarrasch / Amb.hs
Created August 21, 2013 21:17
Amb in haskell
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Amb where
import Control.Monad
newtype Amb a = Amb { unAmb :: [a] }
deriving(Monad)
safeHead :: [a] -> Maybe a
safeHead (x:_) = Just x
@Tarrasch
Tarrasch / main.cpp
Last active December 11, 2015 19:08
My usual cpp file template (a dsl on it's own) used forprogramming competitions
//Arash Rouhani
#define _GLIBCXX_DEBUG
//#define NDEBUG
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <sstream>
#include <string>
#include <math.h>
@Tarrasch
Tarrasch / lista.markdown
Created August 12, 2012 10:11
Packlista: Cultural Learnings of America for Make Benefit Glorious Technical University of Chalmers

Packlista

Packlista för Atlantavistelsen

Resehandlingar o värdesaker

Bör ligga i handbagage.

  • För gränskontroll, checkin etc.
  • Pass
@Tarrasch
Tarrasch / README.md
Created July 22, 2012 15:39
Unfortunately, the gem hanna-nouveau (0.2.4) has an invalid gemspec. As a result, Bundler cannot install this Gemfile. Please ask the gem author to yank the bad version to fix this issue. For more information, see http://bit.ly/syck-defaultkey

I don't know why, but this "worked for me"

gem uninstall bundler

gem install bundler -v '< 1.1'

@Tarrasch
Tarrasch / README.md
Last active September 12, 2016 18:14
Unity plus xmonad configuration (Ubuntu 12.04)

What

This is my xmonad+unity panel config. With this config, you'll have a well integrated panel from unity but still have xmonad as your window manager with your gnome apps, including the pretty gnome-terminal (for those too lazy to learn xmoobar).

This config doesn't have the unity launcher, mainly becuse it causes windows to be unfloatable, besides I'm not fond of it anymore.

How

Copy and paste these lines (or understand what it does and do it manually).

@Tarrasch
Tarrasch / about.md
Created July 7, 2012 17:35 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@Tarrasch
Tarrasch / gist:2862979
Created June 3, 2012 10:37
xmonad config that has shortcut for opening gmail in a firefox tab
-- requires your system has `xdotool` installed
gmailInFirefox =
spawn "xdotool search 'Mozilla Firefox' windowactivate --sync key --clearmodifiers 'alt+1'"
-- ...
-- example usage
keys = const $ M.fromList [
((mod4Mask, xK_d ), gmailInFirefox)
@Tarrasch
Tarrasch / gist:2823400
Created May 29, 2012 08:56
latex stuff good to install
ii latex-beamer 3.10-1 LaTeX class to produce presentations
ii latex-xcolor 2.11-1 Easy driver-independent TeX class for color
ii preview-latex-style 11.86-2ubuntu1 extraction of elements from LaTeX documents as graphics
ii texlive-latex-base 2009-15 TeX Live: Basic LaTeX packages
ii texlive-latex-base-doc 2009-15 TeX Live: Documentation files for texlive-latex-base
ii texlive-latex-extra 2009-10ubuntu1 TeX Live: LaTeX supplementary packages
ii texlive-latex-extra-doc 2009-10ubuntu1 TeX Live: Docum
@@ -170,8 +170,8 @@ ActiveRecord::Schema.define(:version => 20120307214249) do
t.string "watchable_type"
t.integer "watchable_id"
t.string "action"
- t.datetime "created_at"
- t.datetime "updated_at"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
t.boolean "notify_by_email", :default => false
@@ -345,6 +346,7 @@ DEPENDENCIES
eco
exception_notification!
factory_girl_rails
+ fakefs
foreman