Skip to content

Instantly share code, notes, and snippets.

@satyr
satyr / google++.ubiq.js
Last active March 12, 2022 18:06 — forked from satyr/google-keynav.ubiq.js
google++
Utils.extend(feed, {
title: 'google++',
author: {
name: 'satyr', email: 'murky.satyr\x40gmail.com',
homepage: 'http://satyr.github.com',
},
license: 'X',
})
const
Google = 'https://www.google.com/',
@JoelBesada
JoelBesada / dabblet.css
Created March 18, 2012 16:09 — forked from anonymous/dabblet.css
CSS States
/* CSS States */
body {
background: url(http://dabblet.com/img/noise.png);
background-color: #F5F2F0;
font-family: Georgia, serif;
font-size: 18px;
line-height: 1.6em;
text-shadow: 0 2px 0 white;
color: #222;
}
@sindresorhus
sindresorhus / LICENSE.txt
Created May 14, 2012 10:35 — forked from 140bytes/LICENSE.txt
View source - view the generated source of a page (140byt.es)
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2012 Sindre Sorhus <http://sindresorhus.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@adamsilver
adamsilver / Questions.md
Created May 14, 2012 12:35 — forked from Integralist/Questions.md
Recruitment Questions for front-end developer (modified from https://github.com/darcyclarke/Front-end-Developer-Interview-Questions)

##JavaScript specific Questions

  • Which JavaScript libraries have you used?
  • How is JavaScript different from Java?
  • What are undefined and undeclared variables?
  • What is an expression?
  • What is a statement?
  • Give an example of a function declaration
  • Give an example of a function expression
  • Explain what the DOM is and some best practices for interacting with it.
@karlseguin
karlseguin / gist:2724327
Created May 18, 2012 09:43
Collects all the IDs and classes from a given element down (like document.body)
function scan(parent) {
var found = {classes: {}, ids: []};
var unexamined = [parent];
while (unexamined.length > 0) {
parent = unexamined.pop();
var nodeLength = parent.childNodes.length;
for(var i = 0; i < nodeLength; ++i) {
node = parent.childNodes[i];
if (node.nodeType != 1) { continue; }
@paulrouget
paulrouget / es6.js
Last active October 6, 2015 07:07
Some ECMAScript 6 element are available in Firefox
// To test this code in Firefox, I encourage you to use Firefox Aurora
// and to include your script this way:
// <script type="application/javascript;version=1.8">
// (necessary to make `let` work)
/* let ********************************************* */
// let is the new var :)
// Declares a block scope local variable
@ThisIsMissEm
ThisIsMissEm / requireDir.js
Created July 4, 2012 14:42 — forked from TheDeveloper/requireDir.js
Node.js require directory
var fs = require('fs');
var Path = require('path');
function requireDir(dir){
var modules = {};
fs.readdirSync(dir).map(function(name){
return Path.join(dir, name);
}).filter(function(path){
return fs.statSync(path).isFile();
@getify
getify / gist:3057796
Created July 6, 2012 02:58
exploring javascript type auto-coercion (and its pitfalls)
// **********
// NOTE: this is a stupid trivial example illustrating automatic
// type-coercion, not an example of the kind of data-structure logic
// you'd ever actually use. don't miss the forest for the trees.
// Read down in the comment thread for 'myCoolString' for a slightly
// more sensible example.
//
// NOTE #2: this gist thread was spawned from a twitter discussion
// about `parseInt(0/1,19)==18`:
// https://twitter.com/getify/status/221009838006747136
@axelpale
axelpale / combinations.js
Last active July 7, 2023 10:37
JavaScript functions to calculate combinations of elements in Array.
/**
* Copyright 2012 Akseli Palén.
* Created 2012-07-15.
* Licensed under the MIT license.
*
* <license>
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
* (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
@jeromeetienne
jeromeetienne / README.md
Created July 16, 2012 08:15
coder fun: chained api going too far :)

The code you see below is a funny building of chained API :) it is a particle emitter for flame throwers. look at the running demo. I love the end of the flame. all in a single chained instruction. Recently i did all my libraries with chained api and i like it. the lib used below is fireworks.js. This particular emitter is a bit too much chained tho :)

but still i look at the size of the source and at the effect on the screen... you got a pretty cool looking effects for 60lines of javascript. maybe i should just break it in several instructions... would be artificial but hey :)

= a coder having fun