I've been trying to understand how to setup systems from
the ground up on Ubuntu. I just installed redis
onto
the box and here's how I did it and some things to look
out for.
To install:
//test-uncaught-errors | |
var sys = require('sys') | |
, EventEmitter = require('events').EventEmitter; | |
function error1 (err){ | |
sys.puts("Handle: " + err); | |
} | |
function error2 (err){ | |
sys.puts("JANDAL: " + err); | |
} | |
function exit (){ |
/** | |
* Like, basically PERFECT scrollbars | |
*/ | |
/* | |
It's pure CSS. | |
Since a quick google search will confirm people going crazy about Mac OS Lion scrollbars... | |
this has no fade-out effect. | |
In Mac OS Lion, the lowest common denominator is always showing scrollbars by a setting. |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Testing d3.js in Leaflet.js</title> | |
<link rel="stylesheet" href="leaflet.css"></link> | |
<script src="http://mbostock.github.com/d3/d3.v2.js?2.8.1"></script> | |
<script src="http://code.leafletjs.com/leaflet-0.3.1/leaflet.js"></script> | |
<style type="text/css"> | |
svg , g |
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Leaflet TopoJSON Example</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> | |
<link rel="stylesheet" href="//cdn.leafletjs.com/leaflet-0.4.5/leaflet.css" /> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> | |
<script src="//cdn.leafletjs.com/leaflet-0.4.5/leaflet.js"></script> |
# MAC manipulators | |
alias random_mac='sudo ifconfig en0 ether `openssl rand -hex 6 | sed "s/\(..\)/\1:/g; s/.$//"`' | |
alias restore_mac='sudo ifconfig en0 ether YOUR_ORIGINAL_MAC_ADDRESS_GOES_HERE' |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Linq; | |
using REsideUtility; | |
using System; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Text; |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent