Skip to content

Instantly share code, notes, and snippets.

View joshcarr's full-sized avatar
👁️
Seeing

Josh Carr joshcarr

👁️
Seeing
View GitHub Profile
@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@johnpolacek
johnpolacek / .gitconfig
Last active April 30, 2024 06:00
My current .gitconfig aliases
[alias]
co = checkout
cob = checkout -b
coo = !git fetch && git checkout
br = branch
brd = branch -d
brD = branch -D
merged = branch --merged
st = status
aa = add -A .
@biovisualize
biovisualize / README.md
Last active August 29, 2015 14:02
10K points line chart with progressive rendering

10K points in an interactive line chart using the excellent Kay Chang's (AKA Syntagmatic) progressive rendering.

It also uses some nice tricks like throttling the brush move (from underscore) and bisecting the data points to find the hovered dots. The reactive hover and tooltip clearly shows that the UI is not blocked by the rendering. You can even hover the points before they are rendered!

@brysonian
brysonian / curses.txt
Last active April 22, 2023 17:56
curses
8ball
8ballposse
abtoklas
aceta
ackackgun
adavans
adipex
adipost
adrenochrome
ahitler
@anasnakawa
anasnakawa / tiny-js-pubsub.js
Last active February 2, 2023 08:14
very tiny Pub/Sub implementation that utilizes native browser event methods. ( only browsers .. no IE8 )
/*! Js Pub/Sub
* http://anasnakawa.com/
* Copyright (c) Anas Nakawa
* inspired by Ben Alman's one <https://gist.github.com/cowboy/661855>
* MIT License
*/
(function( p ) {
var e = p.e = {};
@bomberstudios
bomberstudios / sketch-plugins.md
Last active February 26, 2024 07:02
A list of Sketch plugins hosted at GitHub, in no particular order.
@berzniz
berzniz / jshipster_and_and.js
Last active May 22, 2022 23:15
Some small javascript hacks for hipsters
// Boring
if (isThisAwesome) {
alert('yes'); // it's not
}
// Awesome
isThisAwesome && alert('yes');
// Also cool for guarding your code
var aCoolFunction = undefined;
@Cezarion
Cezarion / affix.html
Created October 8, 2013 10:36
Affix js with vanilla js
<script type="text/javascript">
window.onscroll = scroll;
function scroll () {
var scrollTop = window.pageYOffset;
console.log(scrollTop);
if( scrollTop > 363 ){
document.getElementById('summary').style.top="20px";
document.getElementById('summary').style.position="fixed";
}
else
@blockloop
blockloop / Gruntfile.js
Created May 26, 2013 03:27
hexo gruntfile generate example
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.initConfig({
watch: {
sourceFiles: {
files: ['themes/**','scaffolds/**','scripts/**','source/**','app.js'],
tasks: 'shell:hexoGen'
},