Skip to content

Instantly share code, notes, and snippets.

View gillesdemey's full-sized avatar
♥️
Be kind to others

Gilles De Mey gillesdemey

♥️
Be kind to others
View GitHub Profile
@paton
paton / simple.js
Last active October 7, 2019 16:14
Super simple implementation of define() and require() used in Localize.js (https://localizejs.com)
var define, require;
(function() {
var modules = {};
require = function(name) {
return modules[name]();
};
define = function(name, fn) {
@kchida
kchida / gist:d1c15f3968f4f8272c49
Created July 17, 2014 05:06
etcd vs consul vs ???
- What do Etcd, Consul, and Zookeeper do?
- Service Registration:
- Host, port number, and sometimes authentication credentials, protocols, versions
numbers, and/or environment details.
- Service Discovery:
- Ability for client application to query the central registry to learn of service location.
- Consistent and durable general-purpose K/V store across distributed system.
- Some solutions support this better than others.
- Based on Paxos or some derivative (i.e. Raft) algorithm to quickly converge to a consistent state.
- Centralized locking can be based on this K/V store.
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active April 30, 2024 04:42
A badass list of frontend development resources I collected over time.
@mckamey
mckamey / bezier.js
Created September 25, 2012 16:35
JavaScript port of Webkit CSS cubic-bezier(p1x.p1y,p2x,p2y) and various approximations
/*
* Copyright (C) 2008 Apple Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
@speier
speier / visitor.js
Created May 16, 2012 22:05
node-visitor recursively visits every required file using node-detective
var fs = require('fs');
var path = require('path');
var Module = require('module');
var detective = require('detective');
// node-visitor
function visit(request, parent) {
var fn;
try {
@alotaiba
alotaiba / google_speech2text.md
Created February 3, 2012 13:20
Google Speech To Text API

Google Speech To Text API

Base URL: https://www.google.com/speech-api/v1/recognize
It accepts POST requests with voice file encoded in FLAC format, and query parameters for control.

Query Parameters

client
The client's name you're connecting from. For spoofing purposes, let's use chromium

lang
Speech language, for example, ar-QA for Qatari Arabic, or en-US for U.S. English

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables