Skip to content

Instantly share code, notes, and snippets.

<html>
<head>
<title></title>
<script type='text/javascript'>
function add_to_body() {
var divObal = document.createElement("div");
divObal.setAttribute("id", "obal");
divObal.style.width = "400px";
divObal.style.height = "300px";
divObal.style.backgroundColor = "Grey";
@kadel
kadel / hakan.c
Created January 2, 2012 20:20
hakan - bwt
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define TRUE 1
#define FALSE 0
typedef char bool;
@kadel
kadel / gist:2768868
Created May 22, 2012 12:53
salt watch not working
ganglia-monitor:
pkg:
- installed
service:
- running
- watch:
- file: /etc/ganglia/gmond.conf
- pkg: ganglia-monitor
file:
- managed
package:
- pkg.installed
- version: {{ pkg_version }}
@kadel
kadel / pom.xml
Created November 13, 2012 17:33 — forked from jnatkins/pom.xml
A sample POM for setting up a basic Maven project for CDH application development
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- Replace the group ID with your group ID -->
<groupId>com.mycompany.hadoopproject</groupId>
<!-- Replace the artifact ID with the name of your project -->
<artifactId>my-hadoop-project</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
test = {1:1, 2:{2.1:2.1}, 3:{3.1:{3.2:3.2}}}
def r(a, path=[]):
for k,v in a.iteritems():
if type(v) == dict:
path.append(k)
r(v, path)
path.pop()
else:
# Codenames for Debian suites according to their alias. Update these when
# needed.
OLDSTABLE_CODENAME="squeeze"
UNSTABLE_CODENAME="sid"
TESTING_CODENAME="jessie"
STABLE_CODENAME="wheezy"
STABLE_BACKPORTS_SUITE="$STABLE_CODENAME-backports"
# List of Debian suites.
DEBIAN_SUITES=($OLDSTABLE_CODENAME $UNSTABLE_CODENAME $TESTING_CODENAME $STABLE_CODENAME

Keybase proof

I hereby claim:

  • I am kadel on github.
  • I am tomaskral (https://keybase.io/tomaskral) on keybase.
  • I have a public key whose fingerprint is E4A4 3FE4 4620 8597 647F B587 E690 DA7E 4F29 1FA6

To claim this, I am signing this object:

@kadel
kadel / gist:f7cacc9673cf5c85a596
Created September 22, 2014 16:20
gnome-terminal theme
background-color: rgb(37,46,50)
font: Monospace 14
foreground-color: rgb(148,163,165)
palette: ['rgb(0,0,0)', 'rgb(204,0,0)', 'rgb(78,154,6)', 'rgb(196,160,0)', 'rgb(52,101,164)', 'rgb(117,80,123)', 'rgb(6,152,154)', 'rgb(211,215,207)', 'rgb(85,87,83)', 'rgb(239,41,41)', 'rgb(138,226,52)', 'rgb(252,233,79)', 'rgb(114,159,207)', 'rgb(173,127,168)', 'rgb(52,226,226)', 'rgb(238,238,236)']
@kadel
kadel / 0_reuse_code.js
Last active August 29, 2015 14:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console