Skip to content

Instantly share code, notes, and snippets.

View alekslt's full-sized avatar

Aleks L.T alekslt

View GitHub Profile
#!/bin/sh
#
# For each ref, validate the commit.
#
# - It disallows deleting branches without a /.
# - It disallows non fast-forward on branches without a /.
# - It disallows deleting tags without a /.
# - It disallows unannotated tags to be pushed.
@alekslt
alekslt / gist:3387606
Created August 18, 2012 15:23 — forked from runehol/gist:3387195
gdb auto-run
#!/bin/bash
exe=$1
shift 1
gdb -x <(echo "run $@") $exe
OBJS = lib/yo.o lib/mama.o
DEPS = $(OBJS:.o=.d) src/test.d src/test-framework.d
all: lib/libyomama.a
clean:
$(RM) $(OBJS) lib/libyomama.a src/test.o src/test-framework.o
lib/libyomama.a : $(OBJS)
$(AR) $(ARFLAGS) $@ $?
@alekslt
alekslt / java-intcachewtf
Created November 20, 2010 13:30
java integer cache
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
Integer a = 1000;
Integer b = 1000;
Integer c = 42;