Skip to content

Instantly share code, notes, and snippets.

View gearsdigital's full-sized avatar

Steffen Giers gearsdigital

View GitHub Profile
@gearsdigital
gearsdigital / chatting.js
Created March 31, 2017 20:53 — forked from bmeck/chatting.js
a chat server using generators to manage connection state.
'use strict';
/*::
type Client = Object;
type Channel = string;
*/
const channels/*: Map<Channel, Set<Client>> */ = new Map;
const clients/*: Map<Client, Set<Channel>> */ = new WeakMap;
const join = (name, client) => {
if (!channels.has(name)) {
@gearsdigital
gearsdigital / sticky-nav.js
Created April 27, 2016 12:26 — forked from arielsalminen/sticky-nav.js
Simple sticky nav in plain JS
// Simple sticky nav in plain JS
// p.s. this is just a short example, you should remember to debounce the scroll event ;-)
if ("addEventListener" in window && "classList" in document.documentElement) {
var element = document.getElementById("nav"),
offset = element.offsetTop;
window.addEventListener("scroll", function() {
if (offset < window.pageYOffset) {
element.classList.add("fixed");
App.CollectionRoute = Ember.Route.extend({
model: function (params) {
return this.get('store').find('collection', params.collection_id);
},
serialize: function(record, options){
console.log(record, options)
}
});
@gearsdigital
gearsdigital / gist:4466732
Created January 6, 2013 12:01
Starting Samsung Channel List Editor: SamyGO-ChanEdit-v54cd-MacOSX_Oracle_x64_cocoa_by_loggn.de.jar
java -d64 -XstartOnFirstThread -jar SamyGO-ChanEdit-v54cd-MacOSX_Oracle_x64_cocoa_by_loggn.de.jar
@gearsdigital
gearsdigital / Clean Up “Open With” Menu
Created November 29, 2012 10:47
Clean Up “Open With” Menu
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
@gearsdigital
gearsdigital / functions.php
Created September 27, 2012 09:35
Wordpress Custom Menu
<?php
/**
* Split the menu to top level items and the children of the
* current active parent.
* @see http://helperclass.blogspot.de/2011/11/creating-separate-sub-menu-in-wordpress.html
*/
class SplitMenu_Walker_Nav_Menu extends Walker_Nav_Menu {
private $menu = false;
@gearsdigital
gearsdigital / gist:1958811
Created March 2, 2012 14:41 — forked from anonymous/gist:1904282
Ant With Colors in OS X Terminal
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
ant () { command ant -logger org.apache.tools.ant.listener.AnsiColorLogger "$@" | sed 's/2;//g' ; }
@gearsdigital
gearsdigital / SassMeister-input.scss
Created September 17, 2015 06:34
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
// Grid settings
$grid-gutter-width: 8px !default;
$grid-columns: 12 !default;
$breakpoints: (xs: 320, sm: 768, md: 1024, lg: 1440);
%clearfix {
@gearsdigital
gearsdigital / SassMeister-input.scss
Created September 2, 2015 20:54
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
$columns: 12;
%grid {
float:left;
margin:0 4px;
}
@gearsdigital
gearsdigital / SassMeister-input.scss
Last active September 2, 2015 20:52
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
$columns: 12;
%grid {
float:left;
margin:0 4px;
}