Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
function getAllPermutations(string) { | |
var results = []; | |
if (string.length === 1) { | |
results.push(string); | |
return results; | |
} | |
for (var i = 0; i < string.length; i++) { | |
var firstChar = string[i]; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="CH 4 functions" content="Javascript Patterns"> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</headJavascript patterns | |
<body> | |
Javascript Patterns, by Stoyan Stefanov (O'Reilly). Copyright 2010 Yahoo!, Inc., 9780596806750. | |
<script id="jsbin-javascript"> |
(function($, window, undefined) { | |
var InfiniteScroll = function() { | |
this.initialize = function() { | |
this.setupEvents(); | |
}; | |
this.setupEvents = function() { | |
$(window).on( | |
'scroll', | |
this.handleScroll.bind(this) |
import React from 'react' | |
import ReactDOM from 'react-dom' | |
const Hello = ({name}) => <h1>Hello {name}!</h1> | |
ReactDOM.render( | |
<Hello name={"vjeux"}/>, | |
document.body.appendChild(document.createElement("div")) | |
) |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
/* | |
* Property prefix hacks | |
*/ | |
/* IE6 only - any combination of these characters */ | |
_ - £ ¬ ¦ | |
/* IE6/7 only - any combination of these characters */ |
(function() { | |
// Do not use this library. This is just a fun example to prove a | |
// point. | |
var Bloop = window.Bloop = {}; | |
var mountId = 0; | |
function newMountId() { | |
return mountId++; | |
} |
/* | |
* The reason for this is just a thought exercise | |
* often people(myself super included) are so confused | |
* when trying something new, but breaking it down | |
* to it's simplest existence can be the best way to understand | |
*/ | |
function createStore(reducer, initState) { | |
let state = initState; | |
let subscribers = []; |
/* @flow */ | |
type State = Object | |
type Action = {type: string | void} | |
type AsyncAction = (performAction: FluxPerformFunction, state: State) => void | |
type ActionCreator = () => Action | AsyncAction | |
type StoreFunction = (state: State, action: Action) => State |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |