Skip to content

Instantly share code, notes, and snippets.

View andrzejsliwa's full-sized avatar

Andrzej Śliwa andrzejsliwa

View GitHub Profile
(global-set-key (kbd "C-c p f") 'projectile-find-file)
(global-set-key (kbd "C-c p F") 'projectile-find-file-other-window)
(global-set-key (kbd "C-c p d") 'projectile-find-dir)
(global-set-key (kbd "C-c p D") 'projectile-find-dir-other-window)
(global-set-key (kbd "C-c C-c d") 'projectile-dired)
(global-set-key (kbd "C-c p b") 'projectile-switch-to-buffer)
(global-set-key (kbd "C-c p a") 'projectile-ag)
(global-set-key (kbd "C-c p i") 'projectile-invalidate-cache)
(global-set-key (kbd "C-c p k") 'projectile-kill-buffers)
(global-set-key (kbd "C-c p p") 'projectile-switch-project)

Summary

I'm trying to figure out how to use rebar to:

  • create erlang project
  • add a dependency on an erlang module from github
  • start the app via the erl console
  • create a release and start the app from the release (via the generated scripts)
# Query side
require 'json'
c = Bunny.new.tap(&:start)
r = ElmerFudd::JsonPublisher.new(c)
r.call('retailers.echo', {str: 'hello'}, timeout: 1) # => "HELLO"
# Responder side
(ns blog.errors.core
(:require-macros
[cljs.core.async.macros :refer [go]]
[blog.utils.macros :refer [<?]])
(:require
[cljs.core.async :refer [>! <! chan close!]]))
;; convert Node.js async function into a something
;; that returns a value or error on a channel
(defn run-task [f & args]
%% @doc A small module that jumps between connected nodes.
%% @author Gianfranco Alongi <gianfranco.alongi@gmail.com>
%% @author Adam Lindberg <hello@alind.io>
-module(virus).
-export([start/0]).
-export([start/1]).
start() -> spawn_process(code:get_object_code(?MODULE)).
start(Beam) -> spawn_process(Beam).
SELECT
pid,
datname,
query,
EXTRACT(EPOCH FROM (NOW() - query_start)) AS duration
FROM pg_stat_activity
WHERE state='active'
ORDER BY query_start ASC;
Runtime r = Runtime.getRuntime();
Process p = r.exec("uname -a");
p.waitFor();
BufferedReader b = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line = "";
while ((line = b.readLine()) != null) {
System.out.println(line);
}
@andrzejsliwa
andrzejsliwa / gist:7a03a28dfdc5440bb745
Created January 4, 2015 17:55
configuration modification of RetroReplay cart image (with Turbo Macro Pro 1.2 REU)
using:
hexedit carts/rr38p-tmp12reu.bin
search for offsets (enter):
$a11b - frame color
$a11c - background color
$a11d - message line color
$a11e - info line color
@andrzejsliwa
andrzejsliwa / gist:f1619ed7c18083b92272
Created February 21, 2015 15:33
Collection of Commodore C64 for sale
Collection of Commodore C64 for sale :
Commodore C64C (with power supply, used - very good condition)
Commodore C65G (with power supply, used - very good condition)
Turbo Chameleon 64 (with docking station + c64 keyboard + RR-NET MK3, new - http://www.c64-wiki.de/index.php/Turbo_Chameleon_64)
Monitor (1702 with power supply, used - very good condition)
Philips LCD (small Monitor for c64)
2 x 1541 Ulitmate 2 (new - http://www.1541ultimate.net/content/index.php)
1541 II (with power supply, used - very good condition)

Converting libraries to Ember CLI addons

In this guide we will cover two main cases:

  • Ember specific library
  • vendor library

Ember library

The Ember library will assume that Ember has already ben loaded (higher in the loading order) and thus will assume it has access to the Ember API.