Skip to content

Instantly share code, notes, and snippets.

View we4tech's full-sized avatar

Hossain Khan we4tech

View GitHub Profile
@surjikal
surjikal / prediction-io-ubuntu-precise.md
Last active March 24, 2017 11:33
Prediction IO Install Notes on Ubuntu Precise (12.04)
@clay-whitley
clay-whitley / export_processor.md
Last active April 5, 2017 04:53
km-export-processor Documentation

km-export-processor gem

The purpose of this gem is to consume the JSON that KISSmetrics exports to an S3 bucket, and transform it in a variety of useful ways.

The core features are:

  • JSON compiler : Aggregates all KISSmetrics JSON files in a directory, into a single (nonstandard) file.
  • JSON to JSON converter : Converts a nonstandard JSON file into standard format.
  • JSON to CSV converter : Converts a nonstandard JSON file into a CSV file, where each row is an event/property/alias.
  • Reimporter : Takes a nonstandard JSON file, and an API key, and sends the data in the JSON file to the product using the KMTS gem.
@lox
lox / README.md
Last active August 2, 2023 16:48
Grout - A golang based routing front proxy

Grout

Grout is an HTTP-based front proxy that delegates portions of a url path space to other web applications. This allows for a web application to be composed of a collection of micro-services.

Beyond routing based on url, language or ip-based region, Grout provides downstream services with a unique per-request X-Grout-Id and a per-session X-Grout-Session header for simple cross-service sessions.

Motivation

Presently 99designs.com is composed of 2-3 different web applications. Varnish sits in front of these web applications and dispatches requests to the appropriate backend based on some complicated regular expressions and a large chunk of complicated VCL.

@mvidaurre
mvidaurre / fibo_tail_recursion.rb
Created April 17, 2014 19:30
Calculate the nth Fibonacci number, f(n). Using invariants for https://github.com/RayHightower/fibonacci
# Calculate the nth Fibonacci number, f(n). Using invariants
def fibo_tr(n, acc1, acc2)
if n == 0
0
elsif n < 2
acc2
else
return fibo_tr(n - 1, acc2, acc2 + acc1)
end
end
@BrianWill
BrianWill / Go overview.md
Last active April 14, 2024 07:22
Go language overview for experienced programmers

The Go language for experienced programmers

Why use Go?

  • Like C, but with garbage collection, memory safety, and special mechanisms for concurrency
  • Pointers but no pointer arithmetic
  • No header files
  • Simple, clean syntax
  • Very fast native compilation (about as quick to edit code and restart as a dynamic language)
  • Easy-to-distribute executables
@palkan
palkan / Gemfile
Last active April 25, 2024 14:23
RSpec profiling with RubyProf and StackProf
gem 'stackprof', require: false
gem 'ruby-prof', require: false
@onlyforbopi
onlyforbopi / HtmlPhpConverter.bsh
Last active August 15, 2022 15:57
Linux.Bash.Loops #linux #bash #loop #loops #for #while #iteration 1. While with multiple conditions 2. For Loop + Examples 3. While Loop + Examples 4. Until Loop + Examples 5. Loop Break + Examples 6. Loop Continue + Examples 7. Select statement + E
#!/bin/bash
# Make a php copy of any html files
for value in $1/*.html
do
cp $value $1/$( basename -s .html $value ).php
done