Skip to content

Instantly share code, notes, and snippets.

@funkotron
funkotron / gist:78df6988a09ee1396840
Last active August 29, 2015 14:22
Inside The Mind of The Machine <game>
<fun>
<begin>
<if Tech Super Hero Matrix not already open>
Open this URL in a new browser tab: j.mp/mosaic-browser
</if>
</begin>
Which technology superstars can you find in this Matrix?
Somewhere in there you might find a tiny sample of them; maybe you can add more? The Mosaically Matrix is open for Remix and you can Submit your favourite Heroes to be included. But right now, deep inside the mind of the machine are:
@funkotron
funkotron / dev-reload
Created April 29, 2015 01:01
bin/dev
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
nREPL server started on port 50793 on host 127.0.0.1 - nrepl://127.0.0.1:50793
* Initializing CLJS compiler & source server on port 8083
Starting watch on Resources/vee-out
Reflection warning, clojure/data/priority_map.clj:215:19 - call to method equiv on java.lang.Object can't be resolved (no such method).
Reflection warning, clojure/core/memoize.clj:72:23 - reference to field cache can't be resolved.
Starting file watcher (CTRL-C to quit)...
Elapsed time: 0.023 sec
@funkotron
funkotron / ios-sim-reload
Created April 29, 2015 01:00
bin/ios-sim
Titanium Command-Line Interface, CLI version 3.4.2, Titanium SDK version 3.5.1.GA
Copyright (c) 2012-2015, Appcelerator, Inc. All Rights Reserved.
Please report bugs to http://jira.appcelerator.org/
[INFO] tiapp.xml <sdk-version> set to 3.5.0.GA, but current Titanium SDK set to 3.5.1.GA
[INFO] Forking correct SDK command: "/usr/local/bin/node" "/usr/local/bin/titanium" "build" "--sdk" "3.5.0.GA" "--retina" "--tall" "--config-file" "/Users/adam/.titanium/config.json" "--platform" "iphone" "--project-dir" "/Users/adam/workspace/veestarter" "--log-level" "trace" "--device-id" "FA27B608-29A7-4314-8EB8-7E5752831043" "--ios-version" "8.3" "--sim-version" "8.3" "--target" "simulator"
Wed Apr 29 2015 01:57:52 GMT+0100 (BST)
@funkotron
funkotron / inversion_count.jl
Created February 15, 2014 04:02
Count inversions in a string using Julia
# Julia program to count number of inversions in a string
# using properties of the MergeSort algorithm
global inversions = 0
function arrange(xs, ys)
result = Int64[]
while (length(xs) > 0) & (length(ys) > 0)
if xs[1]<=ys[1]
push!(result,shift!(xs))
@funkotron
funkotron / all_your_base.py
Created February 15, 2014 03:57
Solution to "All Your Base" Google Codejam contest in Python http://code.google.com/codejam/contest/189252/dashboard#s=p0
#!/usr/bin/python
def distinct(j):
seen = set()
for i in j:
if i not in seen:
seen.add(i)
return seen
def next_index(c):
@funkotron
funkotron / all_your_base.clj
Created February 15, 2014 03:54
Solution to "All Your Base" Google Codejam contest in Clojure http://code.google.com/codejam/contest/189252/dashboard#s=p0
(ns jam.all-your-base
(:require [clojure.math.numeric-tower :as math]))
(def in (rest (clojure.string/split (slurp "A-large-practice.in") #"\n")))
(defn p [x y]
(math/expt x y))
(defn next-index [x]
(cond
@funkotron
funkotron / euler4.clj
Created February 15, 2014 02:52
Problem 4 of Project Euler in Clojure
(defn palindrome?
"Is x the same read backwards?"
[x]
(let [s (seq (str x))]
(= s (reverse s))))
(def three-digit-products
"All the products of two three-digit numbers"
(for [x (range 100 999)
#!/bin/bash
Dir="/home/a/Dropbox/wallpaper"
if [ ! -d "$Dir" ]; then
echo "Not Exist $Dir"
exit 1
fi
SetBG () {
#!/bin/bash
#Set up external monitor if connected
EXTERNAL=`xrandr | grep -i "HDMI1 disconnected"`
if [ -z $EXTERNAL ]; then
xrandr --output HDMI1 --auto --left-of eDP1
fi
sleep 1
#Set up main monitor
xrandr --output eDP1 --auto
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!