Skip to content

Instantly share code, notes, and snippets.

View robert-moore's full-sized avatar

Rob Moore robert-moore

View GitHub Profile
@lancejpollard
lancejpollard / meta-tags.md
Created March 5, 2012 13:54
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@Integralist
Integralist / 1. Example.scss
Created October 22, 2012 14:10
Sass Mixin for CSS3 Animations
@include keyframe(fadeout) {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@0xjjpa
0xjjpa / chrome.md
Created December 9, 2012 04:37
Understanding Google Chrome Extensions

#Introduction

Developing Chrome Extensions is REALLY fun if you are a Front End engineer. If you, however, struggle with visualizing the architecture of an application, then developing a Chrome Extension is going to bite your butt multiple times due the amount of excessive components the extension works with. Here are some pointers in how to start, what problems I encounter and how to avoid them.

Note: I'm not covering chrome package apps, which although similar, work in a different way. I also won't cover the page options api neither the new brand event pages. What I explain covers most basic chrome applications and should be enough to get you started.

Table of Contents

  1. Understand the Chrome Architecture
  2. Understand the Tabs-Extension Relationship
  3. Picking the right interface for the job
@truher
truher / knapsack-test.js
Last active August 4, 2016 16:51
0-1 knapsack solution in javascript
/*global portviz:false, _:false */
/*
* after rosettacode.org/mw/index.php?title=Knapsack_problem/0-1
*
* details: https://github.com/truher/truher.github.com/wiki/Knapsack
*/
var allwants = [
{name:"map", weight:9, value: 150},
{name:"compass", weight:13, value: 35},
{name:"water", weight:153, value: 200},
@yanofsky
yanofsky / LICENSE
Last active June 5, 2024 21:51
A script to download all of a user's tweets into a csv
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@jremmen
jremmen / knapsacktable.js
Created June 20, 2013 06:34
js:knapsack object, returns optimal solution in total value, total weight, items selected, and a binary selection process
var Knapsack = function(o) {
this.values = o.values;
this.weights = o.weights;
this.capacity = o.capacity;
this.createSolutionTable = function () {
this.table = this.initializeMatrix();
for(i = 1; i <= this.values.length; i++) {
for(k = 0; k < this.capacity; k++) {
@danwoods
danwoods / knapsack.js
Last active April 19, 2022 13:57
Knapsack algorithm in JavaScript
//Knapsack algorithm
//==================
// wikipedia: [Knapsack (0/1)](http://en.wikipedia.org/wiki/Knapsack_problem#0.2F1_Knapsack_Problem)
// Given a set `[{weight:Number, benefit:Number}]` and a capacity,
// find the maximum value possible while keeping the weight below
// or equal to the capacity
// **params**:
// `capacity` : Number,
// `items` : [{w:Number, b:Number}]
// **returns**:
@StuPig
StuPig / water_ripple_canvas.js
Created February 8, 2014 02:27
Use JavaScript and canvas to create water ripple effect
/*
* Water Canvas by Almer Thie (http://code.almeros.com).
* Description: A realtime water ripple effect on an HTML5 canvas.
* Copyright 2010 Almer Thie. All rights reserved.
*
* Example: http://code.almeros.com/code-examples/water-effect-canvas/
* Tutorial: http://code.almeros.com/water-ripple-canvas-and-javascript
*/
@dkrnl
dkrnl / selectize-optgroup_checkbox.js
Last active December 6, 2023 10:52
Selectize optgroup checkbox
/**
* Plugin: "optgroup_checkbox" (selectize.js)
* Copyright (c) 2015 Dmitri Piatkov & contributors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
@robert-moore
robert-moore / README.md
Last active January 17, 2021 08:38
A New Pattern for Updatable D3.js Charts

Using a new updatable chart format. Update functions are made accessible to the caller, handing over chart controls with full functionality to the caller in a modular manner. Data binding is done with method chaining, like any other configuration variable, and can be changed after initialization. This allows for changes to be rendered in the context of chart history, leveraging D3's transitions and update logic.