Skip to content

Instantly share code, notes, and snippets.

@blixt
blixt / prng.js
Last active March 30, 2025 04:16
A very simple, seedable JavaScript PRNG. NOTE: Please read comments on why this is not a good choice.
// NOTICE 2020-04-18
// Please see the comments below about why this is not a great PRNG.
// Read summary by @bryc here:
// https://github.com/bryc/code/blob/master/jshash/PRNGs.md
// Have a look at js-arbit which uses Alea:
// https://github.com/blixt/js-arbit
/**
@rlemon
rlemon / random-image-background.js
Last active August 29, 2015 14:04
random image from imagur every 60 seconds
(function () {
"use strict";
var parts = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',
canvas = document.createElement('canvas'),
context = canvas.getContext('2d');
imgur();
function makeImage(url, cb) {
@loktar00
loktar00 / chatfavicon userscript
Last active August 29, 2015 14:02
User script for animated favicon on the SO Chatrooms
// ==UserScript==
// @name Favicon update for pinned chat
// @version 0.1
// @description Updates the favicon with the message count
// @match http://chat.stackoverflow.com/*
// ==/UserScript==
var canvas = document.createElement('canvas'),
ctx = canvas.getContext('2d'),
origFav = document.querySelector('[rel="shortcut icon"]'),
@Zirak
Zirak / result.org
Last active August 29, 2015 14:02

Vote results:

commandvotes
awsm16
norris14
domain13
zalgo13
meme11
inhistory9
todo8
@rlemon
rlemon / contest.md
Last active May 3, 2024 19:39
HTML / CSS room contest.

##Sketching with css

This challenge is simple: Push the limits of CSS and make something beautiful and hacky1.

###Competition. If you would like to submit an entry, comment on this Gist or Ping me on StackOverflow and I will add your creating to the collection on codepen.

@harthur
harthur / ml-in-js.md
Created May 13, 2014 19:01
Machine Learning JS libraries
@rlemon
rlemon / README.md
Last active December 20, 2016 20:36
so snippets userscript WIP

so chat snippets

okay here is the deal, this is a WIP and i'm still working on it but in the meantime you might enjoy it.

install by downloading the script, and dragging and dropping on chrome://extensions/

refresh the chat page and click the 'snippets' button.

the interface is pretty simple:

@Qantas94Heavy
Qantas94Heavy / fail.js
Created April 17, 2014 14:54
Screw your JS up
delete eval;
delete parseInt;
delete parseFloat;
delete isNaN;
delete isFinite;
delete decodeURI;
delete decodeURIComponent;
delete encodeURI;
delete encodeURIComponent;
delete Object.getPrototypeOf;
@benjamingr
benjamingr / gist:10536349
Created April 12, 2014 13:40
Bluebird asParallel
Promise.longStackTraces();
//end debug
/**
Hijack Promise.map to accept parallelism limit argument
**/
function queueConcurrent(work, degreeOfParallelism) {
// work is array of functions returning promises
"use strict";
@SomeKittens
SomeKittens / app.js
Last active August 29, 2015 13:57
Passport auth example
// assuming you're using express
'use strict';
//express stuffs
var passport = require('passport');
var user = require('./user');
// Configs the passports
require('./passportConfig');