Skip to content

Instantly share code, notes, and snippets.

View ba55ie's full-sized avatar
🍌
Use the Source Luke

Sebastiaan ba55ie

🍌
Use the Source Luke
  • Schiedam
View GitHub Profile
@aklump
aklump / jquery.equal_heights.js
Last active October 11, 2018 14:35
jQuery plugin to apply equal heights to children of a DOM element, with filters and targets.
/**
* Equal Heights Plugin
* Equalize the heights of all child elements to the tallest child
*
* @param object options
* - filter: An optional selector string to filter which children are considered.
* - not: An optional selector string to filter which children are NOT considered.
* - target: Additional selector of targets where height will be applied; these nodes
will not be used to calculate height, but will ONLY receive the calculated
height.
@domenic
domenic / promises.md
Last active July 17, 2025 03:03
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.

Groeiplan

Daniel Louwe Kooijmans - VI Company

Doel

Een versnelde groei van entry level naar junior front-end developer om uiteindelijk VI Company aan te kunnen vullen als een op zichzelf opererende front-end developer met de benodigde vaardigheden.

Veel vaardigheden worden op de werkvloer aangeleerd maar specifieke skills vergen dieper onderzoek/testen dan een reguliere klant-opdracht toelaat. Om dit tegemoet te komen zal ik door middel van zelfstudie mijn skillset uitbreiden.

Skills

JavaScript

@charleslouis
charleslouis / bem-cheat-sheet.txt
Created June 5, 2013 11:24
CSS - BEM - Cheat Sheet
For more details, see :
SMACCS and Fifty Shades of BEM (http://blog.kaelig.fr/post/48196348743/fifty-shades-of-bem)
prefix-ComponentName
prefix-ComponentName-MODIFIERNAME
prefix-ComponentName-subObject
prefix-ComponentName-subObject-MODIFIERNAME
p- Page specific (class applied on the body element), very useful for static pages where maintainability is not at stake — should be avoided in the application itself (e.g.: p-Homepage).
@renegare
renegare / gulp-karma.js
Last active March 28, 2018 05:37
Gulp Karma Integration
/**
* testing tasks (using karma to test in the browser). Requires a karma.conf.js for full config
* single-run testing
* continuous testing
*/
/** base deps, but you may need more specifically for your application */
var gulp = require('gulp');
var gutil = require('gulp-util');
var path = require('path');
@tracker1
tracker1 / 01-directory-structure.md
Last active July 15, 2025 15:02
Anatomy of a JavaScript/Node project.

Directory structure for JavaScript/Node Projects

While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.

Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.

Directories

  • lib/ is intended for code that can run as-is
  • src/ is intended for code that needs to be manipulated before it can be used

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@AllThingsSmitty
AllThingsSmitty / mustard.js
Last active April 13, 2016 14:02
Revised cut-the-mustard browser feature detection
// Streamlined CTM method using Page Visibility API (http://caniuse.com/#feat=pagevisibility)
if ('visibilityState' in document) {
// Modern browser, add JS functionality
}
// Previous CTM method based on which DOM features are present
if('querySelector' in document
&& 'localStorage' in window
&& 'addEventListener' in window) {
// Modern browser, add JS functionality
@beaugunderson
beaugunderson / cool-modules.md
Last active February 2, 2023 19:58
cool modules from nodeconf

from streams session

  • end-of-stream - specify a callback to be called when a stream ends (which is surpsingly hard to get right)
  • duplexify - compose a Duplex stream from a Readable and a Writable stream
  • pump - pipe streams together and close all of them if one of them closes
  • pumpify - combine an array of streams into a single duplex stream using pump and duplexify
  • through2 - tools for making Transform streams
  • from2 - tools for making Readable streams

from "participatory modules" session

@dimitardanailov
dimitardanailov / sample-nginx.conf
Last active June 3, 2021 17:30
Configuration for single page application(Framework: Angularjs, Web server: Nginx)
server {
listen 80 default deferred;
server_name myapp.com;
root /var/www/project-folder/;
# Nginx and Angularjs with html mode 5 - https://gist.github.com/cjus/b46a243ba610661a7efb
index index.html;