Skip to content

Instantly share code, notes, and snippets.

@iamedu
iamedu / gist:862575
Created March 9, 2011 17:18
Create lift projects using maven
Scala 2.8.1 and Lift 2.2 final
==============================
mvn archetype:generate \
-DarchetypeGroupId=net.liftweb \
-DarchetypeArtifactId=lift-archetype-basic_2.8.1 \
-DarchetypeVersion=2.2 \
-DarchetypeRepository=http://scala-tools.org/repo-releases \
-DremoteRepositories=http://scala-tools.org/repo-releases \
-DgroupId=com.company \
@iamedu
iamedu / gist:1041700
Created June 23, 2011 01:24
Merge and ignore specific file
git merge --no-commit branch
git checkout --ours -- thefile.ext
git commit -m "Horrendouse message"
@iamedu
iamedu / proxy.js
Created July 3, 2011 23:34
Node http proxy, to check headers and files
var http = require('http');
var sys = require('sys');
http.createServer(function(request, response) {
sys.log(request.connection.remoteAddress + ": " + request.method + " " + request.url);
sys.log("Request headers " + JSON.stringify(request.headers, null, '\t'));
var options = {
host: request.headers.host,
port: 80,
@iamedu
iamedu / Questions
Created July 14, 2011 14:52
Magma Rails Give-away
Day Job:
Developer/Cofounding Just Cloud
Open Source contribution (if any):
None yet
Tell me about your experience with Ruby/Rails:
Some experiments, and admin apps for clients.
How do you use GitHub:
@iamedu
iamedu / MyCalendar.java
Created September 8, 2013 02:12
Very simple dumb implementation of MyCalendar
public class MyCalendar {
public static DAY = 1;
public static MONTH = 2;
public static YEAR = 3;
private int day;
private int month;
private int year;
public MyCalendar() {
@iamedu
iamedu / .vimrc
Created May 7, 2014 20:43
My VimRC
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
# cesar/base
FROM ubuntu
MAINTAINER Juan Chito <juan@chito.com>
# Add apt repository needed
RUN echo 'deb http://archive.ubuntu.com/ubuntu trusty main universe' > /etc/apt/sources.list
RUN echo 'deb http://archive.ubuntu.com/ubuntu trusty-security main universe' >> /etc/apt/sources.list
RUN echo 'deb http://archive.ubuntu.com/ubuntu trusty-updates main universe' >> /etc/apt/sources.list
RUN echo 'deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse' >> /etc/apt/sources.list
@iamedu
iamedu / .ctags
Last active August 29, 2015 14:06
dotfiles
--recurse=yes
--tag-relative=yes
--exclude=.git
--langdef=Clojure
--langmap=Clojure:.clj
--regex-clojure=/\([ \t]*create-ns[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/n,namespace/
--regex-clojure=/\([ \t]*def[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/d,definition/
--regex-clojure=/\([ \t]*defn-?[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/f,function/
--regex-clojure=/\([ \t]*defmacro[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/m,macro/
@iamedu
iamedu / gist:cf129ab027785bed8dc2
Created September 21, 2014 15:27
Check phone service
import java.security.*
class PhoneHasherService {
String checkHashPhone(String phone, String hash) {
int iterations = 128
String [] hashParts = hash.split(":")
### Keybase proof
I hereby claim:
* I am iamedu on github.
* I am iamedu (https://keybase.io/iamedu) on keybase.
* I have a public key whose fingerprint is 529F 8101 A1E9 684D F828 6F9A 4AB8 268D F41D 083A
To claim this, I am signing this object: