Skip to content

Instantly share code, notes, and snippets.

Tom Crinson MrJaba

Block or report user

Report or block MrJaba

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@MrJaba
MrJaba / programming-resources.txt
Created Jun 19, 2014
List of interesting programming resources
View programming-resources.txt
Podcasts:
Ruby Rogues - http://rubyrogues.com/
Ruby5 - http://ruby5.envylabs.com/
FunctionalGeekery - http://www.functionalgeekery.com/
Screencasts:
Destroy all software - https://www.destroyallsoftware.com/screencasts
Ruby Tapas - http://www.rubytapas.com/
News:
@MrJaba
MrJaba / tmp2.clj
Last active Aug 29, 2015
Various 4Clojure Problems
View tmp2.clj
(ns tmp2)
(def data [1 1 2 3 2 1 1])
(def data2 [1 2 1 3 1 2 4])
( #(reduce (fn [acc el]
(if-not (some #{el} acc)
(conj acc el)
acc))
View gist:44684
class A
self << class
private
def private_method_test
end
end
View gist:126513
import scala.io.Source
object ListComparer{
def main( args: Array[String] ){
if( args.length == 2 ){
println( listDifferences( args(0), args(1) ) )
}
else
Console.err.println( "Needs two filenames")
View gist:127772
Minimech.Mechs = function(){
//private methods and variables
var canvas = null;
function drawLine(x1 ,y1, x2, y2){
var line = canvas.path({stroke: "#036"}).moveTo(x1, y1).lineTo(x2, y2);
}
//public ones
return {
View gist:131808
//Supplier Payments Specific Javascript
VTG.SupplierPayments = {
//Method which identifies the currently selected suppliers and hides the others
addOnChangeToSupplierFilter: function(){
$("#supplier_filter").change( function () {
var selectedSupplier = $("select#supplier_filter option:selected").attr('value');
VTG.SupplierPayments.showAllBookingRows();
VTG.SupplierPayments.hideAllExceptSelectedSupplier( selectedSupplier );
VTG.SupplierPayments.showTableHeader();
View gist:131807
//Supplier Payments Specific Javascript
VTG.SupplierPayments = {
//Method which identifies the currently selected suppliers and hides the others
addOnChangeToSupplierFilter: function(){
$("#supplier_filter").change( function () {
var selectedSupplier = $("select#supplier_filter option:selected").attr('value');
VTG.SupplierPayments.showAllBookingRows();
VTG.SupplierPayments.hideAllExceptSelectedSupplier( selectedSupplier );
VTG.SupplierPayments.showTableHeader();
View Prag Kata 06 - Anagrams
import scala.io.Source;
import scala.collection.mutable;
class Anagrams(file:String){
private val combinations = mutable.Map.empty[String, List[String]];
def run() : List[List[String]] = {
for( word <- Source.fromFile(file).getLines ){
val characterStr = sortByChars(word.trim);
View Prag Kata 5 - bloom filter
import scala.io.Source;
import scala.collection.mutable;
class Bloom( file : String ){
private val words = mutable.Map.empty[Int, Int];
def initialize() : Unit = {
populateBitmap();
}
def populateBitmap() : Unit = {
View Prag Kata 5 - bloom filter v2
import scala.io.Source;
import scala.collection.mutable;
class Bloom( file : String, hashFunctions : List[(String) => Int] ){
private val words = mutable.Map.empty[Int, Int];
def initialize() : Unit = {
populateBitmap();
}
def populateBitmap() : Unit = {
You can’t perform that action at this time.