Skip to content

Instantly share code, notes, and snippets.

View JSkally's full-sized avatar

Jason Scott JSkally

  • Kingston, Jamaica
View GitHub Profile
# Takes a list of lists 'l' and returns a flattened list of the elements and subelements of l
def flatten(l):
return reduce(lambda x,y:x+y,l)
package main
import (
"fmt"
"github.com/PuerkitoBio/goquery"
"strings"
)
func crawl (url string) {
doc, err := goquery.NewDocument(url)
@JSkally
JSkally / fuck off docs
Last active August 29, 2015 14:24
Fuck off DOCS
" If you prefer the Omni-Completion tip window to close when a selection is
" " made, these lines close it on movement in insert mode or when leaving
" " insert mode
autocmd CursorMovedI * if pumvisible() == 0|pclose|endif
autocmd InsertLeave * if pumvisible() == 0|pclose|endif
# Configuration file for the audio service
# This section contains options which are not specific to any
# particular interface
[General]
Disable=Socket
# Switch to master role for incoming connections (defaults to true)
#Master=true
import java.util.concurrent.*;
import java.util.*;
public final class MLFQueue {
private int MAX_NUM_OF_PROCESSES = 20;
private int queue1Quantum = 8, queue2Quantum = 16, contextSwitchTime=2;
private int lastProcessQueue;
private Object[] queues = new Object[3];
import java.util.ArrayList;
import java.util.Arrays;
import java.lang.Math;
class Process
{
public static final boolean CPU_BURST=true, IO_BURST=false;
execute pathogen#infect()
:set expandtab
:set tabstop=2
:set shiftwidth=2
:set autoindent
:set smartindent
:set ruler
:set mouse=a
:set number
@JSkally
JSkally / .tmux.conf
Last active December 17, 2015 10:29
A pretty simple .tmux.conf file to get anyone started on tmux
#Ctrl-a instead of Ctrl-b
unbind C-b
set -g prefix C-a
#Ctrl-a takes you back to your last window
bind-key C-a last-window
#load man page
bind-key ? command-prompt "split-window -h 'exec man %%'"
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
void loadFile();
void processFile(int);
char txtfile[512];
int recordsize=22;
char id[9];
//Array of cards to display in the game
var cards = ["0", "A", "2", "3", "4", "5", "6", "7", "8", "9", "J", "Q", "K", "♥", "♠", "♦", "♣"];
//Max of 24 attempts (48 clicks)
var tries = 48;
//Attempt counter
var attempts = 0;
var pairsLeft = 8;
var section = document.getElementsByTagName('section')[0];
var canvas = document.getElementsByTagName('canvas')[0];
var a = canvas.getContext('2d');