Skip to content

Instantly share code, notes, and snippets.

View lamida's full-sized avatar
😀

Jon Kartago Lamida lamida

😀
View GitHub Profile
@lamida
lamida / env
Last active December 20, 2015 10:49
export JAVA_HOME=/opt/jdk-current
export GOROOT=/opt/go
export PATH=$PATH:/opt/jdk-current/bin
export PATH=$PATH:/opt/apache-maven-current/bin
export PATH=$PATH:/opt/scala-current/bin
export PATH=$PATH:/opt/clojure-current
export PATH=$PATH:/opt/go/bin
export PATH=$PATH:/opt/sbt/bin
export PATH=$PATH:/opt/mongodb-current/bin
export PATH=$PATH:/opt/hadoop-current/bin
;;; my solution
(define (min a b)
(if (< a b) a b))
(define (min3 a b c)
(min a (min b c)))
(define (square x)(* x x))
@lamida
lamida / .bowerrc
Last active August 29, 2015 14:02
{
"directory": "public/lib",
"proxy":"http://<proxy>",
"https-proxy":"http://<proxy>"
}
@lamida
lamida / .vimrc
Last active April 21, 2018 08:11
execute pathogen#infect()
syntax on
filetype plugin indent on
filetype plugin on
set omnifunc=syntaxcomplete#Complete
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set nu
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<version>1</version>
</project>
@lamida
lamida / gist:8a949caea73dbaad16c7
Last active August 29, 2015 14:04
array-permutation.c
#include <stdio.h>
#include <stdlib.h>
void swap(int *a, int *b)
{
//printf("%p %p\n", a, b);
//printf("%d %d\n", *a, *b);
int tmp = *a;
*a = *b;
*b = tmp;
public class Permut {
public static void main(String[] args) {
int ar[] = { 1, 2, 3};
permut(ar, 0);
}
public static void print(int[] ar){
for(int i = 0; i < ar.length; i++){
System.out.printf("%d ", ar[i]);
}
@lamida
lamida / Sorting.java
Last active August 29, 2015 14:05
Sorting.java
public class MainSort {
public void print(int[] ar){
for(int a : ar){
System.out.print(a + " ");
}
System.out.println();
}
public void swap(int[] ar, int a, int b){
int temp = ar[b];
public class Permut {
public void print(int[] ar){
for(int a : ar){
System.out.print(a + " ");
}
System.out.println();
}
public void swap(int[] ar, int a, int b){
package controllers
import play.api._
import play.api.mvc._
object Application extends Controller with LoggerSupport {
def index = Action { implicit req =>
logger.info(s"Serving index to ${req.remoteAddress}")
Ok(views.html.index())
}