Skip to content

Instantly share code, notes, and snippets.

@dzlab
dzlab / Spiral.java
Last active August 29, 2015 14:03
Filling a map with a Spiral algorithm (description here http://www.commentcamarche.net/forum/affich-1824691-algorithme-niveau-signore)
import java.awt.Point;
import java.util.Scanner;
public class Spiral {
private final int n;
private final int center;
private final int[][] matrix;
public Spiral(int n)
@dzlab
dzlab / hiring.md
Created May 28, 2014 15:21 — forked from timf/hiring.md

Hiring!

The Dell Cloud Manager engineering team is growing. We're looking for seven new software developers at many different experience levels.

In this gist, I want to give you an idea of:

  • Who we are looking for
  • What we work on
@dzlab
dzlab / Dockerfile
Last active August 29, 2015 14:00
A Dockerfile for installing erocci from an erlang image
# Use Ubuntu image where erlang is installed
FROM ubuntu
MAINTAINER dzlab dzlabs@outlook.com
# installing erlang-related prerequis
RUN apt-get install -y libssl-dev libstdc++-4.8-dev build-essential
# installing erocci prerequis
RUN apt-get install -y libncurses5-dev libexpat1-dev libxml2-dev uuid-runtime
@dzlab
dzlab / github_repo_analyzer
Created February 9, 2014 16:16
A sample program for mining Github repositories to analyze a community of developers interested in similar things among the seed repository used for initial graph crawling
# Code example from the book 'Mining Social Web'
import os
from github import Github
import networkx as nx
import sys
from operator import itemgetter
from collections import Counter
from networkx.readwrite import json_graph
ACCESS_TOKEN = 'GET A Personal Access Key from through your Github account'
@dzlab
dzlab / Tor network
Last active January 4, 2016 18:09
A sample Tor network configuration
= Tor Network Graph
:neo4j-version: 2.0.0-RC1
:twitter: @esoufy
:tags: domain:networks, use-case:Tor
This interactive Neo4j tutorial covers a scenario in a Tor Network with a large infrastructure that includes a number of host and servers, a Hidden Web Server, ARM application for monitoring the Tor network status.
'''
=== Tor Network meta-model
@dzlab
dzlab / coverage_test.sh
Created August 29, 2012 18:56
A python script for coverage testing, it takes a unit test case as a parameter
#!/bin/sh -e
err() { echo 1>&2 "$@"; exit 1; }
[ -n "$1" -a -z "$2" ] || err 'Usage: cover <filename>'
[ -r "$1" ] || err "Cannot read $1."
coverage erase || err 'Cannot run coverage.'
coverage run "$1"
rm -rf htmlcov
coverage html
@dzlab
dzlab / fuzzer.py
Created August 26, 2012 21:03
A Fuzzer test sccript for randomly testing applications
#!/usr/bin/python
# 5-line fuzzer below is from Charlie Miller's
# "Babysitting an Army of Monkeys":
# Part 1 - http://www.youtube.com/watch?v=Xnwodi2CBws
# Part 2 - http://www.youtube.com/watch?v=lK5fgCvS2N4
# Presentation at http://www.scribd.com/doc/60008912/cmiller-CSW-2010
# List of files to use as initial seed
file_list=[