Skip to content

Instantly share code, notes, and snippets.

@MrHassanMurtaza
MrHassanMurtaza / install_ncdu_amazon_linux.sh
Created February 11, 2020 07:29
Install ncdu on amazon linux 2
#!/bin/bash
# install packages/dependencies for compilation
sudo yum -y install gcc make ncurses-devel
cd /tmp
# the latest version of ncdu is published here: http://dev.yorhel.nl/ncdu
# update the link below if necessary:
wget -nv http://dev.yorhel.nl/download/ncdu-1.10.tar.gz
@umrashrf
umrashrf / aws_ses.bash
Created July 26, 2016 19:05
Amazon AWS CLI - SES SEND EMAIL
sudo pip install awscli
aws configure
aws ses send-email \
--from "john@gmail.com" \
--destination "ToAddresses=mike@gmail.com" \
--message "Subject={Data=from ses,Charset=utf8},Body={Text={Data=ses says hi,Charset=utf8},Html={Data=,Charset=utf8}}"
@debasishg
debasishg / gist:8172796
Last active March 15, 2024 15:05
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&rep=rep1&t
@jurka
jurka / gist:3027104
Created July 1, 2012 06:19
Installing supervisor under ubuntu
#run as sudo
apt-get install python-setuptools curl
easy_install supervior
curl https://raw.github.com/gist/176149/88d0d68c4af22a7474ad1d011659ea2d27e35b8d/supervisord.sh > /etc/init.d/supervisord
#to run it
chmod +x /etc/init.d/supervisord
#adding to autostart
@mshafrir
mshafrir / states_hash.json
Created May 9, 2012 17:05
US states in JSON form
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",
@OakRaven
OakRaven / app.coffee
Created January 6, 2012 17:31
HTML Test for CoffeeScript and KnockoutJS
class ComboBoxItem
constructor: (@id, @name) ->
class App
textEntry: ko.observable("")
collection: ko.observableArray([])
addToCollection: ->
item = new ComboBoxItem(@collection().length, @textEntry())
<?php
class DefaultController extends Controller
{
/**
* Dashboard page.
* @Permissions(perm="dashboard_view")
* @Route("/", name="ITEDashboardBundle_index")
* @Template()
* @return array
@Djexus
Djexus / currying.py
Created September 4, 2011 19:48
Curry decorator for Python functions and methods
import inspect
def curry(func, *args, **kwargs):
'''
This decorator make your functions and methods curried.
Usage:
>>> adder = curry(lambda (x, y): (x + y))
>>> adder(2, 3)
@justfalter
justfalter / how_to_install_qcachegrind_on_osx.txt
Created June 16, 2011 16:04
How to install qcachegrind (kcachegrind) on OSX Snow Leopard
SUMMARY
I like to use kcachegrind for doing profiling on my ruby code. Most of my development
is done on OSX, and while you can install kcachegrind via macports, it takes forever
because it has to build KDE, as well. Much to my surprise, the fine folks who
wrote kcachegrind also made a QT version, qcachegrind. I was able to build this on
OSX without too much effort, only having to install QT and GraphViz. Yippie!
I'm running OSX 10.6.7, with Xcode 4. My default gcc/g++ version is 4.2. I'm sure
it will build just fine on earlier versions of Xcode, but I haven't tested it.
@danmackinlay
danmackinlay / supervisord.sh
Created August 27, 2009 07:07
an init.d script for supervisord
#! /bin/sh
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.