Skip to content

Instantly share code, notes, and snippets.

View timgluz's full-sized avatar
😄

Timo Sulg timgluz

😄
View GitHub Profile
@timgluz
timgluz / afile_client.lfe
Last active August 29, 2015 14:20
first working version of afile_server.erl in LFE
(defmodule afile_client
(export [ls 1]
[get_file 2]))
(defun ls [server]
(! server (tuple (self) 'list_dir))
(receive
((tuple server msg) msg)
(after 3000
(lfe_io:format "ls: no response~n" ()))))
@timgluz
timgluz / afile_server.erl
Created May 1, 2015 18:08
First steps in LFE
-module(afile_server).
-export([start/1, loop/1]).
start(Dir) -> spawn(afile_server, loop, [Dir]).
loop(Dir) ->
receive
{Client, list_dir} ->
Client ! {self(), file:list_dir(Dir)};
{Client, {get_file, File}} ->
@timgluz
timgluz / FxOSHTTPServer.js
Created November 19, 2014 19:22
Little working example for `navigator.mozTCPSocket.listen`
/*
PS:
1. you need simulator > 2.2
2. manifest.app must include:
"type": "privileged",
"permissions": {
"tcp-socket" : {
"description" : "Create TCP sockets and communicate over them."
}
*/
@timgluz
timgluz / 0_reuse_code.js
Created August 24, 2014 18:55
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@timgluz
timgluz / gist:a20a8bff1bc8b9e306f1
Created August 21, 2014 14:43
VersionEye badge without hardcoded version

Dependency Status

@timgluz
timgluz / gist:8198872
Created December 31, 2013 16:04
Top10 pushed Java projects on Github
pos repository pushes description repository_url
1 yhadoop-common 53618 https://github.com/griddynamics/yhadoop-common
2 melete 33783 null https://github.com/sakai-mirror/melete
3 hbase 10815 Mirror of Apache Hadoop HBase https://github.com/griddynamics/hbase
4 liferay-portal 5716 https://github.com/liferay/liferay-portal
5 liferay-portal 5634 https://github.com/brianchandotcom/liferay-portal
6 ovirt-engine 5598 This is a miror from gerrit.ovirt.org https://github.com/oVirt/ovirt-engine
7 infinispan 5199 Infinispan is an open source data grid platform and highly scalable NoSQL cloud data store. https://github.com/danberindei/infinispan
8 hadoop-common 4678 Mirror of Apache Hadoop common https://github.com/apache/hadoop-common
@timgluz
timgluz / gist:8198736
Created December 31, 2013 15:55
Top10 pushed Clojure projects on Github
pos project pushes description url
1 zhihu-read-rss 5986 create rss from zhihu.com/read https://github.com/llj098/zhihu-read-rss
2 katello.auto 591 Automated tests for katello https://github.com/RedHatQE/katello.auto
3 modern-cljs 563 A short series of tutorials on ClojureScript https://github.com/magomimmo/modern-cljs
4 italianquiz 541 Interactive quiz application written in Clojure and using mongodb https://github.com/ekoontz/italianquiz
5 clojure-cookbook 535 This is the home of O'Reilly's Clojure Cookbook - http://clojure-cookbook.com https://github.com/clojure-cookbook/clojure-cookbook
6 jest 509 Multi touch game https://github.com/fmsbeekmans/jest
7 core.typed 474 An optional type system for Clojure https://github.com/clojure/core.typed
8 leiningen 473 Automate Clojure projects without setting your hair on fire. https://github.com/te
@timgluz
timgluz / gist:8198475
Last active January 1, 2016 20:39
Top10 Github pushes for Ruby projects
Row repository_name pushes repository_description repository_url
1 Specs 8336 A repository of CocoaPods (cocoapods.org) specifications. https://github.com/CocoaPods/Specs
2 www.cogent.co 7591 Cogent website https://github.com/cogent/www.cogent.co
3 showcase 6529 Deploy your Rails app straight from GitHub to Heroku in a single click, or continuously triggered by your CI. This is an example application for continuous deployment via Travis CI. https://github.com/koideploy/showcase
4 github-hooks-test 6473 https://github.com/lingohub/github-hooks-test
5 whitehall 6344 Inside Government: how the UK Government works, what it's doing, and how you can get involved. https://github.com/alphagov/whitehall
6 emoticommits 5986 Commits and comments with emotions are good for your health 😄 https://github.com/zunda/emoticommits
7 homebrew 5807 The missing package manager for OS X. https://github
@timgluz
timgluz / gist:7718519
Created November 30, 2013 12:36
Testing cljs.core.async channels.
1 (ns chord.client-test
2 (:require-macros [cemerick.cljs.test :refer [is deftest run-tests testing test-var]])
3 (:require [cemerick.cljs.test :as t]
4 [cljs.core.async :refer [unblocking-buffer? put!]]
5 [chord.client :as chord]))
6
7 (deftest make-channel-without-buffer
8 (let [ch (chord/make-channel)]
9 (is (= false (nil? ch)))
10 (is (= false (unblocking-buffer? ch)))
@timgluz
timgluz / gist:7265081
Created November 1, 2013 13:01
executing `./script/bootstrap`
timgluz:github-services timosulg$ ./script/bootstrap
Resolving dependencies...
Installing rake (10.0.3)
Installing activesupport (3.0.20)
Installing builder (2.1.2)
Installing i18n (0.5.0)
Installing activemodel (3.0.20)
Installing activeresource (3.0.20)
Installing addressable (2.2.8)
Installing json (1.8.0)