Skip to content

Instantly share code, notes, and snippets.

View mijoharas's full-sized avatar

Michael Hauser-Raspe mijoharas

View GitHub Profile
#!/usr/bin/env bash
dir=$(dirname $0)
gconfdir=/apps/gnome-terminal/profiles
echo # This makes the prompts easier to follow (as do other random echos below)
########################
### Select a profile ###
########################
@mijoharas
mijoharas / README.md
Last active August 29, 2015 13:57 — forked from JoelBesada/README.md
OpenSpritz

This is a wrapper for the OpenSpritz bookmarklet from here

========================== This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.

Here are the required steps to create a command:

  1. Create a new Gist with a command.js and command.json file, or simply fork this one.

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

defmodule PuzzledPintScriptElixir do
HTTPotion.start
defp get_file_strings do
File.read! "/usr/share/dict/cracklib-small"
end
def list_of_urls do
base_string = "http://www.puzzledpint.com/puzzles/august-2015/semaphore/"
list_of_words = get_file_strings
list_of_lines = String.split(list_of_words, "\n", trim: true)
@mijoharas
mijoharas / flare.json
Last active December 19, 2015 17:59
Broken d3_tree
{
"name": "root",
"children": [
{
"name": "analytics",
"children": [
{
"name": "cluster",
"children": [
{"name": "AgglomerativeCluster1", "size": 1000}
@mijoharas
mijoharas / flare.json
Last active December 19, 2015 18:08
working d3 tree
{
"name": "root",
"children": [
{
"name": "analytics",
"children": [
{
"name": "cluster",
"children": [
{"name": "AgglomerativeCluster1", "size": 1000},
@mijoharas
mijoharas / index.html
Last active December 19, 2015 22:18
d3_tree
<!DOCTYPE html>
<style>
.node {
cursor: pointer;
}
.node circle {
fill: #fff;
stroke: steelblue;
@mijoharas
mijoharas / Arch_install.md
Created September 21, 2013 17:53
Creating Arch install.

Installing ARCH (Basic reminders)

wiki

lifehacker

# keymap
loadkeys dvorak

# uncomment en_GB.UTF-8 for uk
nano /etc/locale.gen
@mijoharas
mijoharas / Gemfile.rb
Created October 1, 2013 07:50
New Rails Project
source 'https://rubygems.org'
gem 'rails', '4.0.1'
gem 'pg', '0.15.1'
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
@mijoharas
mijoharas / Gemfile.rb
Created October 1, 2013 10:01
Basic Gemfile
source 'https://rubygems.org'
gem 'rails', '4.0.0'
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
gem 'bootstrap-sass', '2.3.1.0'