Skip to content

Instantly share code, notes, and snippets.

@hudvin
hudvin / demo.py
Last active January 14, 2020 14:46
khumbu api
import imghdr
import io
import json
import shutil
import requests
valid_credentials = {
"email": "your@username.com",
"password": "your_password",
@hudvin
hudvin / switch.sh
Created March 2, 2018 20:54
keyboard switcher EN<>RU and DE
#!/bin/bash
mode=$1
echo $mode
if [ "$mode" == "de" ]; then
echo "switching to DE layout"
xkb-switch -s de
elif [ "$mode" == "us_ru" ]; then
current_layout=$(xkb-switch)
@hudvin
hudvin / switch.sh
Created March 2, 2018 20:54
keyboard switcher EN<>RU and DE
#!/bin/bash
mode=$1
echo $mode
if [ "$mode" == "de" ]; then
echo "switching to DE layout"
xkb-switch -s de
elif [ "$mode" == "us_ru" ]; then
current_layout=$(xkb-switch)
package tfidf;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.text.DecimalFormat;
import java.util.ArrayList;
#-*- coding: utf-8 -*-
import re
import nltk
from nltk.tokenize import RegexpTokenizer
from nltk import bigrams, trigrams
import math
stopwords = nltk.corpus.stopwords.words('portuguese')
I wasn't first to get the key. Nor was I second, third, or even fourth. I'm probably not even the
10th to get it (ok, looks like I was the 7th.) But I'm happy that I was able to prove to myself
that I too could do it.
First, I have to admit I was a skeptic. Like the handful of other dissenters, I had initially
believed that it would be highly improbable under normal conditions to obtain the private key
through exploiting Heartbleed. So this was my motivation for participating in Cloudflare's
challenge. I had extracted a lot of other things with Heartbleed, but I hadn't actually set out to
extract private keys. So I wanted to see first-hand if it was possible or not.
package forma;
import forma.WholeFileInputFormat;
import cascading.scheme.Scheme;
import cascading.tap.Tap;
import cascading.tuple.Fields;
import cascading.tuple.Tuple;
import cascading.tuple.TupleEntry;
import java.io.IOException;
import org.apache.hadoop.mapred.JobConf;
#!/bin/sh
host=localhost:9200
curl -X DELETE "${host}/test"
curl -X PUT "${host}/test" -d '{
"settings" : { "index" : { "number_of_shards" : 1, "number_of_replicas" : 0 }}
}'
<?php
/*
Plugin Name: My Google Books Library
Plugin URI: http://hugo.activesquirrel.com/dev/my-google-books-library
Description: A simple plugin that displays any number of your Google Books bookshelves including custom bookshelves. This plugin also has a widget and [shortcode] functionality.
Version: 1.0
Author: Hugo Minnaar
Author URI: http://hugo.activesquirrel.com
License: GPL v2