Skip to content

Instantly share code, notes, and snippets.

@iiska
iiska / webpack.config.js
Created August 7, 2017 18:34
Webpack configuration for my Hugo sites
const webpack = require("webpack");
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const ManifestPlugin = require("webpack-manifest-plugin");
const autoprefixer = require("autoprefixer");
const path = require("path");
module.exports = {
entry: {
main: [
"./assets/javascripts/index.js",
@iiska
iiska / keybase.txt
Created June 4, 2014 07:50
Keybase verification
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1
owF1UntQVFUc3gXCyAIr0ZCHeNXBgl3v+55LGIqvghxt0Ikg3e7j3OUusrvuLiur
CzNQIuaoYIMgby001yKBaQbQHmIWw9YgUyhggKCkEM3oRDOCDHUvQ5M10/nrnPP7
zvf7vu93ip7x1fhoVzj9K06wCYla7yivST7a6diP8BbRhcTuR4TdMjQ71J2Zy4RI
LJIBXTxnh3rZEmm2iFBvskfOYWIQJ7TZZYtZQaF6Uo8iOTEqXH0syWYjtFltssqF
CATN4QQFJZQWeMAAQsAEXGQZnGRolGZ5liZYEic5hTLdYnf8qysyy2mQReV2Dp8w
h1+n1LJmCxyHcYQAFCbAcrzI4YAjeQySAkrSkEZRFWiHtjlLsmzP4FSxmdCWsRsa
bBbLrGPBIat1jEQxQAOMwBQ5nD1dtSdJGAcgSooUg0s0BThMEliRF1AoUCLKsBir
@iiska
iiska / candles.rb
Created December 4, 2012 15:30
Candle puzzle encountered in IRC
#! /usr/bin/env ruby
# Finds answer to following puzzle
#
# There are one thousand candles on the altar and one thousand priests
# in the temple. Their god asks the first priest to go and light all
# the candles. Then he has the second priest go to every second candle
# and put it out."
#
# The third goes to every third candle and, if it is not burning, he
@iiska
iiska / convert.py
Created October 24, 2012 12:56
Convert sample.jtl to csv
#! /usr/bin/env python
from xml.etree import ElementTree
from xml.sax.handler import ContentHandler
from xml.sax import parse
import csv
@iiska
iiska / print_cookies.py
Created May 7, 2012 12:42
Using urllib2 and cookielib to print cookies from GET request
import urllib2
import cookielib
cookie_jar = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookie_jar))
urllib2.install_opener(opener)
request = urllib2.Request('http://www.google.com')
urllib2.urlopen(request)
@iiska
iiska / post-receive
Created April 2, 2012 07:21
Post-receive hook which generates html from README.md to be used with gitweb
#!/bin/sh
#
# Post-receive hook script which generates README.html to git-dir from
# README.md found at the head of master branch in repository.
#
# Gitweb can read the README.html and embed it to the project summary page.
git cat-file blob HEAD:README.md | markdown > $GIT_DIR/README.html
@iiska
iiska / problem-50.scm
Created January 31, 2012 15:11
Scheme solution for Project-Euler problem 50
;; The prime 41, can be written as the sum of six consecutive primes: 41
;; = 2 + 3 + 5 + 7 + 11 + 13
;;
;; This is the longest sum of consecutive primes that adds to a prime
;; below one-hundred.
;;
;; The longest sum of consecutive primes below one-thousand that adds to
;; a prime, contains 21 terms, and is equal to 953.
;;
;; Which prime, below one-million, can be written as the sum of the most
@iiska
iiska / lut-helper.c
Created January 11, 2012 13:19
Floating point --> Fixed point --> Bit string conversion for constellation code lookup tables
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
const double qpsk[] = {-1.0, 1.0};
const double qam16[] = {-3.0, -1.0, 3.0, 1.0};
const double qam64[] = {-7.0, -5.0, -1.0, -3.0, 7.0, 5.0, 1.0, 3.0};
/* Generic function for converting short integers to bit string
* representation.
@iiska
iiska / Autostart.sh
Created January 9, 2012 14:05
Using KWallet and ksshaskpass with ssh-agent
#! /bin/bash
# Put this in ~/.kde/Autostart/ssh-agent.sh
export SSH_ASKPASS=/usr/bin/ksshaskpass
/usr/bin/ssh-add
@iiska
iiska / .ackrc
Created December 29, 2011 10:47
Configuration for ack tool
--type-add=ruby=.haml,.rake
--type-add=css=.less
--type-add=coffeescript=.coffee