Skip to content

Instantly share code, notes, and snippets.

# https://stackoverflow.com/questions/19576742/how-to-clone-all-repos-at-once-from-github
CNTX={users|orgs}; NAME={username|orgname}; PAGE=1
curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" |
grep -e 'git_url*' |
cut -d \" -f 4 |
xargs -L1 git clone
@lamida
lamida / .tmux.conf
Created April 21, 2018 08:09
Jon's tmux.conf
set -g prefix C-a
bind C-a send-prefix
setw -g mode-keys vi
set -g mouse on
set-window-option -g xterm-keys on
set-option -g renumber-windows on
#######################################################
# TPM BEGIN
#######################################################
@lamida
lamida / gist:d92c9399a4300ee2e105
Last active August 29, 2015 14:21
.tmux.conf
set -g prefix C-a
bind C-a send-prefix
setw -g mode-keys vi
set -g mode-mouse on
set-window-option -g xterm-keys on
set-option -g renumber-windows on
#######################################################
# TPM BEGIN
#######################################################
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())
}
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){
@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 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 / 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;
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<version>1</version>
</project>
@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