Skip to content

Instantly share code, notes, and snippets.

@milsosa
milsosa / chooser.js
Last active October 9, 2015 20:03 — forked from kentcdodds/chooser.js
JSHint Options Chooser
// Just paste this into the console on http://www.jshint.com/docs/options/
(function() {
var i, row, link, span, extraCol, checkbox, value;
var rows = document.querySelectorAll('table.options tr');
var links = document.querySelectorAll('table.options a');
// add checkboxes
for (var i = 0; i < rows.length; i++) {
row = rows[i];
@milsosa
milsosa / findParentPkgDesc.js
Last active August 27, 2015 21:54
[Node.js] Finds the pathname of the parent module's package descriptor file.
var fs = require('fs');
var path = require('path');
/**
* Finds the pathname of the parent module's package descriptor file. If the
* directory is undefined (the default case), then it is set to the directory
* name of the parent module's filename. If no package.json file is found, then
* the parent directories are recursively searched until the file is found or
* the root directory is reached. Returns the pathname if found or null if not.
*/

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
SELECT UPDATE_TIME
FROM information_schema.tables
WHERE TABLE_SCHEMA = 'dbname'
AND TABLE_NAME = 'tabname'