Skip to content

Instantly share code, notes, and snippets.

Blake Jakopovic blakejakopovic

Block or report user

Report or block blakejakopovic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@blakejakopovic
blakejakopovic / translation_process.md
Created Dec 3, 2014
Bitcoin Revised doc/translation_process.md
View 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 Sep 23, 2014
Spark Core Sketch for testing Firmata over TCP server
View firmata-test-server.ino
#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 Sep 11, 2014
Clojurescript node.js firmata message parser (incomplete)
View message-parse.cljs
(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 Aug 27, 2014
Spark Core Float to Byte Test
View SparkFloatToByteTest.ino
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 Aug 14, 2014
Clojurescript clj-firmata WIP adapter
View adapter-example.cljs
(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
View firmata-spark-example.ino
#include "firmata-spark/firmata-spark.h"
TCPServer server = TCPServer(5678);
TCPClient client;
bool new_client = true;
void setup()
{
// start listening for clients
@blakejakopovic
blakejakopovic / cljs-nw-serial.cljs
Created Aug 3, 2014
FirmataSerial Nodejs Clojurescript clj-firmata serial adapter
View cljs-nw-serial.cljs
(ns cljs-nw-serial.core
(:require [cljs.nodejs :as nodejs]))
(enable-console-print!)
(def SerialPort (.-SerialPort (nodejs/require "serialport")))
(defprotocol FirmataStream
(open! [this] "opens the stream")
@blakejakopovic
blakejakopovic / sysex.clj
Created Jul 23, 2014
Extending clj-firmata in TestDrive
View sysex.clj
(ns testdrive.sysex
(:require [firmata.core :refer [read-sysex-event consume-sysex read-two-byte-data]]))
(def ^{:private true} SYSEX_TYPE_EVENT 0x01 )
(def ^{:private true} SYSEX_TYPE_REGISTER 0x02 )
(def ^{:private true} KIND_ACCELEROMETER 0x01 ) ;;;
(def ^{:private true} KIND_MAGNETIC_FIELD 0x02 ) ;;;
(def ^{:private true} KIND_ORIENTATION 0x03 ) ;
(def ^{:private true} KIND_GYROSCOPE 0x04 ) ;;;
@blakejakopovic
blakejakopovic / SparkGraph.playground
Created Jul 2, 2014
Simple spark graph NSView example written in Swift. Open with Xcode for live preview and coding.
View SparkGraph.playground
import Cocoa
import XCPlayground
@IBDesignable
class SparkGraph: NSView {
// Background Colour
@IBInspectable var backgroundColor:NSColor?
// Border
View definitely_defmethod.clj
user=> (ns there)
nil
there=> (defmulti ^:private doit identity)
#'there/doit
there=> (defmethod doit 1 [x] x)
#<MultiFn clojure.lang.MultiFn@d2de489>
there=> (doit 1)
1
there=> (in-ns 'user)
#<Namespace user>
You can’t perform that action at this time.