Skip to content

Instantly share code, notes, and snippets.

View orlin's full-sized avatar

Orlin M Bozhinov orlin

  • Astrolet
  • Varna, Bulgaria
  • X @orlin
View GitHub Profile
@lukegalea
lukegalea / templateCompiler.js
Created August 8, 2012 01:25
JADE Embedded Handlebars Precompiler
// Renders JADE -> Handlebars, Precompiles and outputs a single template bundle
// For example, https://github.com/lukegalea/recur_in/blob/master/templates/task.jade
// Dependencies
var handlebars = require('handlebars');
var fs = require('fs');
var async = require('async');
var jade = require('jade');
var uglify = require('uglify-js');
var encoder = require('./encoder');
@martintrojer
martintrojer / cl-graph.clj
Last active October 11, 2015 02:57
core.logic graph blog
(ns cl-graph
(:refer-clojure :exclude [==])
(:use clojure.core.logic))
;; Directed Acyclic Graphs
(defrel edge a b)
;; a
;; |
/*
* RSS Subscription Count Node.js Proxy Server
* Devon Govett
* Public Domain
*
* This script is a simple proxy server for my blog's RSS feed that keeps track of requests
* to the feed and attempts to guess a subscriber count.
* Google Reader represents the majority of my subscriber base, and they give you actual
* subscriber numbers when their spider requests your feed. Other aggregators do something similar.
* Otherwise, this script tracks unique IP addresses over a 24 hour period.
@disnet
disnet / annotate.js
Created October 16, 2012 21:19
parameter annotations (type, contract, etc.) in sweet.js
macro def {
case $name:ident ( $($params:ident : $type:ident) (,) ...) $body => {
// just throwing away the type annotation. The semantics of type
// annotations left as an exercise to the reader :)
function $name ($params (,) ...) $body
}
}
def add (a : Number, b : Number) {
return a + b;
@gnunicorn
gnunicorn / Tech Internationals Guide to the Berlin Startup Szene.md
Last active December 14, 2015 11:49
Tech Internationals Guide to the Berlin Startup Szene

Introduction

Well, well, well. So you decided to go to/check out/move to Berlin, Germany, because of its vivid startup scene, he? Alright then, good for you, because there seriously is something going on here. And as I was helping quite a few people to settle in here in the startup scene over the last couple of years, I decided to put all this into this little guide. If you have anything to add: please feel free to make a pull request or use the comments section below.

Disclaimer:

This is totally personally and opinionated and as such doesn't even try to be complete. At all. Don't try this argument on me. This is what I personally recommend everyone, who asks me about. I'll try to keep it up to date, but you better look at the timestamp before going anywhere ;) .

Stay up to date

The first thing you need to do, is to subscribe to the two most important tech-startup-newsletters for Berlin:

@socketstream-owen
socketstream-owen / gist:5461356
Last active December 16, 2015 16:09
Announcing Prism - a new realtime server

Hi all

It's my pleasure to announce the first (alpha) release of Prism, a new realtime server:

https://github.com/socketstream/prism

Prism is a standalone module aimed at those who just want a backend realtime (WebSocket) server and nothing else. It assumes you already have an asset build system, static file server, and many of the other features provided by SocketStream and other web frameworks.

Prism is the first module to be spun out of SocketStream as I work towards releasing version 0.4 of the framework. This process started a few months ago and will continue until all major 'ideas' in SocketStream are separated into small, standalone modules.

@jrburke
jrburke / apiexamples.js
Created April 7, 2011 05:50
Description of browser-friendly module APIs: AMD and Loader Plugins
//*******************************************
// Level 1, basic API, minimum support
//*******************************************
/*
Modules IDs are strings that follow CommonJS
module names.
*/
//To load code at the top level JS file,
//or inside a module to dynamically fetch
@staltz
staltz / index.ios.js
Created April 7, 2015 06:43
Experiment with Cycle.js and React Native
'use strict';
var React = require('react-native');
var Cycle = require('cyclejs');
var {Rx, h} = Cycle;
var createExperimentalIOSRenderer = require('./src/ios-renderer.ios.js');
var {StyleSheet, Text, TextInput, View} = React;
var styles = StyleSheet.create({
container: {
@couchand
couchand / react-d3.js
Created March 5, 2014 16:02
Integrating D3 charts into React.js applications
/** @jsx React.DOM */
// d3 chart function
// note that this is a higher-order function to
// allowing passing in the component properties/state
update = function(props) {
updateCircle = function(me) {
me
.attr("r", function(d) { return d.r; })
.attr("cx", function(d) { return 3 + d.r; })
@madrobby
madrobby / i18n.coffee
Created November 14, 2011 15:45
Backbone i18n with CoffeeScript
# before this file is loaded, a locale should be set:
#
# In a browser environment, you can use:
# ```<script>__locale='en';</script>```
#
# In a server environment (specifically node.js):
# ```global.__locale = 'en';```
# normalize in-app locale string to "en" or "de-AT"
parts = @__locale.split('-')