Skip to content

Instantly share code, notes, and snippets.

View albinotonnina's full-sized avatar
🎯
Focusing

Albino Tonnina albinotonnina

🎯
Focusing
View GitHub Profile
@Rogichi
Rogichi / app.js
Last active December 19, 2015 05:29
Tweet Example (Using VIEZEL Codebird for Appcelerator Titanium. Twitter API 1.1 https://gist.github.com/viezel/5781083 ):
// How Publish a Tweet (Titanium)
// Full Codebird API is here: https://github.com/mynetx/codebird-js
// Codebird for Appcelerator Titanium. Using the Twitter API 1.1: https://gist.github.com/viezel/5781083
//THANKS VIEZEL
@alexhawkins
alexhawkins / HashTable.js
Last active August 7, 2021 23:33
Correct Implementation of a Hash Table in JavaScript
var HashTable = function() {
this._storage = [];
this._count = 0;
this._limit = 8;
}
HashTable.prototype.insert = function(key, value) {
//create an index for our storage location by passing it through our hashing function
var index = this.hashFunc(key, this._limit);
function copyStyles(sourceDoc, targetDoc) {
Array.from(sourceDoc.styleSheets).forEach(styleSheet => {
if (styleSheet.cssRules) { // for <style> elements
const newStyleEl = sourceDoc.createElement('style');
Array.from(styleSheet.cssRules).forEach(cssRule => {
// write the text of each rule into the body of the style element
newStyleEl.appendChild(sourceDoc.createTextNode(cssRule.cssText));
});
@beldar
beldar / react-feature-toggles.md
Created November 20, 2017 15:50
Implementation proposal for feature toggles and multi-variant toggles with React

Toggles

Types of toggles

Release Toggles

These toggles are then corner stone of the Continuous Delivery cycle, they are short lived and mostly for development purposes.

The idea is to wrap all development of the next release in to a toggle (i.e. v2.0.2), this way

@gaearon
gaearon / prepack-gentle-intro-1.md
Last active May 3, 2024 12:56
A Gentle Introduction to Prepack, Part 1

Note:

When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.

A Gentle Introduction to Prepack (Part 1)

If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code:

  • Babel lets you use newer JavaScript language features, and outputs equivalent code that targets older JavaScript engines.