Skip to content

Instantly share code, notes, and snippets.

View blakejakopovic's full-sized avatar

Blake Jakopovic blakejakopovic

View GitHub Profile
@blakejakopovic
blakejakopovic / Guardfile
Created April 6, 2012 07:59 — forked from drnic/Guardfile
An example Guardfile with the works for a Rails app
guard 'rspec', :version => 2 do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
# Rails example
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
@blakejakopovic
blakejakopovic / hack.sh
Created April 1, 2012 08:17 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@blakejakopovic
blakejakopovic / twitter_favourite_reader.rb
Created March 24, 2012 13:41
Open twitter favourite tweets links in new tabs (Mac OS X only)
#!/usr/bin/env ruby
##############################
# WARNING
# Will unfavourite your tweets
#
##############################
require 'twitter'
# require 'redis'

I'm getting rid of some stuff, who wants it? Pickup in Vienna's 6th district. Email thomas@fesch.at if you want something! All of the stuff is well cared-for.

Household stuff

  • Miele washing machine W1749 Softronic. (Very fancy, has a tank for liquid detergent so you don't need to fill in detergent every time you wash). 3 years old, €850,- (original price €1200,-)
@blakejakopovic
blakejakopovic / translation_process.md
Created December 3, 2014 00:28
Bitcoin Revised doc/translation_process.md

Translations

Summary

  • The Bitcoin Core GUI can be easily translated into other languages
  • We use Transifex to manage all translations (Bitcoin Project)
  • The languages manifest file can be found at src/qt/bitcoin.qrc
  • Translation source files are located in src/qt/locale/
  • .ts files are generated translation source files
  • .qm files are compiled binary translation files
@blakejakopovic
blakejakopovic / firmata-test-server.ino
Created September 23, 2014 07:52
Spark Core Sketch for testing Firmata over TCP server
#include "firmata-spark/firmata-spark.h"
TCPServer server = TCPServer(5678);
TCPClient client;
bool new_client = true;
void setup()
{
// start listening for clients
@blakejakopovic
blakejakopovic / message-parse.cljs
Created September 11, 2014 05:58
Clojurescript node.js firmata message parser (incomplete)
(defn parse-message
"Parses incoming data and emits valid messages"
[]
(let [data (js/Buffer 0)]
(fn [emitter buffer]
;; Append new data to buffer
(set! data (.concat js/Buffer [data buffer]))
;; Remove incomplete messages (ie. not control charactors)
@blakejakopovic
blakejakopovic / SparkFloatToByteTest.ino
Created August 27, 2014 07:59
Spark Core Float to Byte Test
float a = 6.7;
float b = 14.6;
float c = 26.3;
byte* method1(float num)
{
byte buff[sizeof(float)];
memcpy(buff, &num, sizeof(float));
return buff;
@blakejakopovic
blakejakopovic / adapter-example.cljs
Created August 14, 2014 08:31
Clojurescript clj-firmata WIP adapter
(ns testdrive.example
(:require [firmata.core :refer [open-board event-channel]]
[firmata.stream :refer [FirmataStream]]
[cljs.nodejs :as nodejs])
(def net (nodejs/require "net"))
(defrecord SocketStream [host port]
FirmataStream
@blakejakopovic
blakejakopovic / firmata-spark-example.ino
Created August 12, 2014 00:41
Spark Core Firmata Example
#include "firmata-spark/firmata-spark.h"
TCPServer server = TCPServer(5678);
TCPClient client;
bool new_client = true;
void setup()
{
// start listening for clients