Updated: Just use qutebrowser (and disable javascript). The web is done for.
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback | |
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB; | |
// Open (or create) the database | |
var open = indexedDB.open("MyDatabase", 1); | |
// Create the schema | |
open.onupgradeneeded = function() { | |
var db = open.result; | |
var store = db.createObjectStore("MyObjectStore", {keyPath: "id"}); |
.fadeinDown { | |
-webkit-animation: fadeInDown 500ms ease-in-out; /* Chrome, Safari, Opera */ | |
animation: fadeInDown 500ms ease-in-out; | |
} | |
/* Chrome, Safari, Opera */ | |
@-webkit-keyframes fadeInDown { | |
0% { |
Here at Bloomfire, we’re loving building new components with React. We’re even going all in with using ES6 modules and inline styles. (‘Inline styles?!’ I hear you say? Don’t knock it ’til you’ve tried it.)
There’s a lot of cool stuff we can do with CSS that we can’t do with inline styles, though; and that’s where Radium comes in. Radium not only provides a handy way to style :hover
, :focus
, and :active
states, but it also deftly handles media queries. If you’re using inline styles in React and not using Radium, you should. I’ll give you a minute to go look it over – here’s the link again.
Back? Okay.
We create a style object in each of our React components, which we then reference in the JSX below. Here’s a super-stripped-down example:
// [myAwesomeButton.js]
- Start in Single User Mode by holding down Command-S when starting the Mac.
- Commands can also be typed via Terminal app when OS X is running.
See also: https://support.apple.com/en-us/HT201573
More tips: http://www.tekrevue.com/tip/mac-startup-options/
- Type
diskutil list
to view available drives
#!/bin/sh | |
# Use AWS CLI to get the most recent version of an AMI that | |
# matches certain criteria. Has obvious uses. Made possible via | |
# --query, --output text, and the fact that RFC3339 datetime | |
# fields are easily sortable. | |
export AWS_DEFAULT_REGION=us-east-1 | |
aws ec2 describe-images \ |
import UIKit | |
public extension CGFloat { | |
/** | |
Converts pixels to points based on the screen scale. For example, if you | |
call CGFloat(1).pixelsToPoints() on an @2x device, this method will return | |
0.5. | |
- parameter pixels: to be converted into points | |
@IBAction func handleTapToFocus(sender: UITapGestureRecognizer) { | |
if let device = captureDevice { | |
let focusPoint = sender.locationInView(previewView) | |
let focusScaledPointX = focusPoint.x / previewView.frame.size.width | |
let focusScaledPointY = focusPoint.y / previewView.frame.size.height | |
if device.isFocusModeSupported(.AutoFocus) && device.focusPointOfInterestSupported { | |
do { | |
try device.lockForConfiguration() | |
} catch { | |
print("ERROR: Could not lock camera device for configuration") |
# Redis Cheatsheet | |
# All the commands you need to know | |
redis-server /path/redis.conf # start redis with the related configuration file | |
redis-cli # opens a redis prompt | |
# Strings. |
- View: Also called a "template", a file that contains markup (like HTML) and optionally additional instructions on how to generate snippets of HTML, such as text interpolation, loops, conditionals, includes, and so on.
- View engine: Also called a "template library" or "templater", ie. a library that implements view functionality, and potentially also a custom language for specifying it (like Pug does).
- HTML templater: A template library that's designed specifically for generating HTML. It understands document structure and thus can provide useful advanced tools like mixins, as well as more secure output escaping (since it can determine the right escaping approach from the context in which a value is used), but it also means that the templater is not useful for anything other than HTML.
- String-based templater: A template library that implements templating logic, but that has no understanding of the content it is generating - it simply concatenates together strings, potenti