Skip to content

Instantly share code, notes, and snippets.

@staltz
staltz / introrx.md
Last active November 14, 2024 11:27
The introduction to Reactive Programming you've been missing
@sqordfish
sqordfish / organize.py
Created June 23, 2014 02:54
Python script for organizing files in windows into multiple folders by file type. I made this primarily to organize my downloads folder.
#Author: Jacob Rust
#Date: 7/8/2013
#Description:This script organizes downloaded files into separate folders depending
#on the file type. This was made for windows systems.
#Download directory should be the first command line argument
#New file types can be added to the dictionary in the main method
import os
import sys
import hashlib
@zaus
zaus / FormRepo.js
Last active January 13, 2023 01:38
Preserve form values across page loads -- i.e. persistent forms. Uses `localStorage` to persist, `jQuery` for utilities.
var FormRepo = function (namespace) {
/// <summary>Persistent form values, saves to localStorage</summary>
/// <param name="namespace" type="String">the namespace to store values in localStorage</param>
// should also protect per page, since we could have the same forms in various places
this.N = namespace + '.' + window.location.pathname;
};
$.extend(FormRepo.prototype, {
namespace: function (key) {
return this.N + '.' + key;