Creating a postgresql 9.5 container with persistent database
docker volume create pgdata
docker run --detach \
--volume pgdata:/var/lib/postgresql/data \
--name postgres \
--env POSTGRES_PASSWORD=postgres \
function asyncThread(fn, ...args) { | |
if (!window.Worker) throw Promise.reject( | |
new ReferenceError(`WebWorkers aren't available.`) | |
); | |
const fnWorker = ` | |
self.onmessage = function(message) { | |
(${fn.toString()}) | |
.apply(null, message.data) | |
.then(result => self.postMessage(result)); |
The following is how I configured a Raspberry Pi 2 as a samba server, using a Seagate Backup Plus Slim, 1TB, drive.
For ease I purchased the CanaKit Raspberry Pi 2 Complete Starter Kit. It runs about $70 and includes enough to get up and running with the Raspberry Pi 2, with the Pi itself, a nice case, power supply, HDMI cable, WiFi adapter, and SD card with NOOBS/Raspbian installer.
For the hard drive I opted to purchase a Seagate Backup Plus Slim 1TB Portable External Hard Drive, since I've had good enough luck with Seagate in the past, and reviews are generally favorable. This ran me $60. I confirmed that it worked fine on my Windows 10 machine, and was already formatted to NTFS.
Unfortunately, once I received the Pi and drive I found that the power supply/Pi wasn't putting off enough power to keep the drive running. After looking at the options, including tweaking the Pi to pass throu
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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
#!/bin/sh | |
if [ -z "$1" ];then | |
echo "Usage:" | |
echo " proj2ram proj-name" | |
echo " proj2ram restore proj-name" | |
exit 1 | |
fi | |
Unicode[edit] | |
Combining characters[edit] | |
In plain text scenarios where markup cannot be used, Unicode offers a number of | |
combining characters that achieve similar effects. | |
The “combining long stroke overlay” (U+0336) results in an unbroken stroke | |
across the text: |
Experiments in envelope budgetting.
See also:
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Dirty script to check if any forks in ahead of master and open that branch commitlist | |
Warning: Uses alot of api calls | |
""" | |
import requests | |
from requests.auth import HTTPBasicAuth |
A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."