Skip to content

Instantly share code, notes, and snippets.

View gabesoft's full-sized avatar

Gabriel Adomnicai gabesoft

  • Quip
  • San Francisco
View GitHub Profile
@Scorpil
Scorpil / emacs_ensime_scala.md
Created October 2, 2012 16:59
Using Emacs with Ensime for Scala development

This tutorial is tested on Debian linux. Should work on other platforms with minimal changes. This post really helped: http://jawher.net/2011/01/17/scala-development-environment-emacs-sbt-ensime/

  • Install jdk and sbt (more on that: https://class.coursera.org/progfun-2012-001/wiki/view?page=ToolsSetup)
  • Install scala-mode for Emacs:
    apt-get install subversion  # in case you don't have subversion already installed 
    svn export http://lampsvn.epfl.ch/svn-repos/scala/scala-tool-support/trunk/src/emacs scala-emacs
    mkdir ~/.emacs.d/scala  # creating folder for scala extensions

mv scala-emacs ~/.emacs.d/scala # moving scala-mode to new folder

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@tylevad
tylevad / xmonad.hs
Last active November 3, 2023 23:14
XMonad window manager config
{-# LANGUAGE TypeSynonymInstances, DeriveDataTypeable, MultiParamTypeClasses, NoMonomorphismRestriction #-}
-- Ty Levad - tylevad@gmail.com
-- xmonad.hs
-- Core Modules
import System.Exit
import XMonad hiding ((|||))
import qualified XMonad.StackSet as W
-- Action Modules
@legumbre
legumbre / foo.md
Created June 29, 2012 00:14
resolving merge conflicts with magit-ediff

Use magit-ediff to resolve merge conflicts

Use magit-ediff or 'e' on an unmerged item to resolve merge conflicts with ediff. Magit will set up an ediff with three buffers A, B and C. A and B are the original (conflicting) files, and C is the conflicted merge.

Use 'n'/'p' to move to the next/previous conflict, use 'a'/'b' to choose which changes (those in a A or B) should be the ones to keep in the merged file.

You can always just switch to buffer C and edit what the merged version should look like.

@dmkash
dmkash / br.sh
Created April 10, 2012 22:44
Shell Script for tmux setup
#!/bin/sh
SESSION_NAME="big_red"
cd ~/Sites/within3/big_red
tmux has-session -t ${SESSION_NAME}
if [ $? != 0 ]
then
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@ryanflorence
ryanflorence / static_server.js
Last active April 26, 2024 16:18
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);