I hereby claim:
- I am daveeveritt on github.
- I am daveeveritt (https://keybase.io/daveeveritt) on keybase.
- I have a public key ASC4zlUh5jhdD13Bwm14IuVafyeDZhB3oGVjMTiAA-Rbigo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>A Vanilla JavaScript querySelectorAll shortcut</title> | |
</head> | |
<body> | |
<h1>A querySelectorAll shortcut</h1> | |
<section class="mydiv">a div</section> |
const [...elArray] = document.getElementsByClassName('class-name'); | |
elArray.forEach( (el) => { | |
el.addEventListener("click", function() { | |
el.classList.toggle('some-class'); | |
}); | |
}); |
require 'camping' | |
Camping.goes :Sqltest | |
module Sqltest::Models | |
class User < Base | |
end | |
class CreateTables < V 1.0 | |
def self.up # should this now be self.change ? | |
create_table :sqltest_users, :force => true do |t| |
//returns 7 day names with today first | |
function startday() { | |
var days = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat']; | |
var today = new Date(); | |
var start = today.getDay(); //gets day number | |
if (start == 0) { //if Sunday, days are in order | |
return days | |
} | |
else { //if not Sunday, start days with today | |
return days.slice(start).concat(days.slice(0,start)) |
The 'quickstart' for OS X on the MongoDB site could be clearer. Here's a condensed version with more info.
Copy the download URL on the MongoDB site (don't click) for the latest download for your system:
www.mongodb.org/downloads
Open Terminal and go to where you keep source files (good to create a directory if you don't have it already with mkdir src
) e.g.:
#!/bin/sh | |
############################################################################ | |
# Run from your 'Home' folder. | |
# Replace 'Bundle Name' with exact name (include spaces but not ".tmbundle") | |
# ./tm_bundle.sh Bundle Name | |
# | |
# This script is adapted from the scripts in this list of bundles: | |
# http://netcetera.org/cgi-bin/tmbundles.cgi | |
# the 'official' bundle list with extensions is at: |
==================================================================== | |
Simple-as-possible instructions to add a field (or more) using South | |
to an existing Django model with existing data. | |
==================================================================== | |
Two versions: | |
1. Super-condensed (the bare minimum - jfdi) | |
2. Detailed-but-brief (if you want more information). | |
Notes: |