Skip to content

Instantly share code, notes, and snippets.

View Teino1978-Corp's full-sized avatar

Teino Boswell Teino1978-Corp

  • Ocho Rios, Jamaica
View GitHub Profile
@Teino1978-Corp
Teino1978-Corp / parse.clj
Created October 31, 2015 20:31 — forked from timsgardner/parse.clj
parse
(defn parse-form [down-tok?, up-tok?, [tok & toks]]
(loop [frm [tok], toks toks]
(if-let [[tok2 & toks2] (seq toks)]
(cond
(down-tok? tok2) (let [[res toks3] (parse-form down-tok?, up-tok?, toks)]
(recur (conj frm res) toks3))
(up-tok? tok2) [(conj frm tok2) toks2]
:else (recur (conj frm tok2) toks2))
[frm nil])))
tokenBase = token showTok posFromTok
where showTok (p, t) = show t
posFromTok (p, t) = p
match x = tokenBase testTok
where testTok (p, t) = if t == x then Just t else Nothing
advance = tokenBase testTok
where testTok (p, t) = Just t
@Teino1978-Corp
Teino1978-Corp / Main.Java
Created October 31, 2015 20:10 — forked from elizabet92/Main.Java
Problem 3 - Depedencies Resolving
/*
!!!!!
For resolving the problem, I am using org.json files. They can be downloaded from: http://www.json.org/java/index.html
!!!!!
*/
package Main;
import org.json.*;
import java.io.File;
import java.io.FileNotFoundException;
var collection_helper = (function () {
var collection = [],
$collection = $(collection),
inCollection = function (item) {
//debugger;
var index = -1,
iterator = 0,
total_iterator = $collection.length;
for (iterator; iterator < total_iterator; iterator++) {
@Teino1978-Corp
Teino1978-Corp / Latex config (debian)
Created October 31, 2015 07:54 — forked from pedroherub/Latex config (debian)
How to config LaTeX environment easily (TexLive)
TexLive (global) -> /usr/share/texlive
TexLive (local) -> /usr/local/share/texlive
Downloading new packages: @ /usr/share/texmf/tex/latex (then => sudo texhash)
Searching for new packages: apt-cache search "package"
Latex local fonts:
(global) put map line here -> /usr/local/share/texmf/web2c/updmap.cfg (then => sudo updmap-sys)
(local) put map line here -> $HOME/texmf/web2c/updmap.cfg (then => updmap)
@Teino1978-Corp
Teino1978-Corp / pivot.rb
Created October 31, 2015 07:46 — forked from bridgpal/pivot.rb
Pivot Algorithm
input = [1, 4, 6, 3, 2]
def get_pivot(input=[])
1.upto(input.length-2) do |pivot|
left = input[0...pivot].inject(:+)
right = input[pivot+1..-1].inject(:+)
return pivot if left == right
end
return -1
end
@Teino1978-Corp
Teino1978-Corp / master-template.tex
Created October 31, 2015 07:37
A master Latex template with many useful packages
\documentclass[12pt]{article}
% math typesetting
\usepackage{array, amsmath, amssymb, amsfonts}
% layout control
\usepackage[paper=a4paper,left=25mm,right=25mm,top=20mm,bottom=25mm]{geometry}
\usepackage[onehalfspacing]{setspace}
\setlength{\parskip}{.5em}
\usepackage{rotating}
@Teino1978-Corp
Teino1978-Corp / streamtop.rb
Created October 31, 2015 05:54 — forked from kmullin/streamtop.rb
streamtop.rb a quick (poorly written) ruby hi_scores list for checking http log files to quickly find trends
#!/usr/bin/env ruby
require 'optparse'
$ctable = Hash.new(0) # table of string => count
def clearTerm
print "\e[2J\e[f"
end
@Teino1978-Corp
Teino1978-Corp / rui_test.h
Created October 31, 2015 03:23 — forked from justinbowes/rui_test.h
RUI test harness. C99, MSVC/GCC/Clang, standalone tests.
//
// rui_test.h
// Quanta
//
// Created by Justin Bowes on 2014-11-06.
// Copyright (c) 2014 Informi Software Inc. All rights reserved.
//
#ifndef rui_test__B2BD1D7_F65A_4026_B67F_437E3C640A18_h
#define rui_test__B2BD1D7_F65A_4026_B67F_437E3C640A18_h
@Teino1978-Corp
Teino1978-Corp / lineread_mmap.ipynb
Created October 31, 2015 03:16 — forked from catawbasam/lineread_mmap.ipynb
Faster, memory-efficient line-oriented text processing in Julia using mmap array
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.