by Ossi Hanhinen, @ohanhi
with the support of Futurice 💚.
Licensed under CC BY 4.0.
#!/bin/bash | |
# IP address to cycle through (in order of priority) | |
ip=( "192.168.20.102" "192.168.20.103" ) | |
# Check if synergy is already connected | |
if pgrep "synergyc"; then | |
# Synergy already connected | |
echo "Synergy is already running." | |
else |
var async = require("async"); | |
var AWS = require("aws-sdk"); | |
var gm = require("gm").subClass({imageMagick: true}); | |
var fs = require("fs"); | |
var mktemp = require("mktemp"); | |
var PAGE_WIDTH = 1300, | |
PAGE_HEIGHT = 1300; | |
var utils = { |
#!/usr/bin/python | |
import os | |
from random import * | |
import fileinput | |
directory = "C:/Program Files/Adobe/" # path to adobe folder | |
directorylen = len(directory) | |
appXmlDirs = [] |
{ | |
"name": "webpack-sass", | |
"version": "1.0.0", | |
"scripts": { | |
"start": "webpack-dev-server --open --mode development", | |
"build": "webpack -p" | |
}, | |
"devDependencies": { | |
"babel-core": "^6.26.0", | |
"babel-loader": "^7.1.4", |
I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.
I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.
Chrome 51 has some pretty wild behaviour related to console.log
in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.
version: "3.6" | |
services: | |
# Traefik Reverse Proxy Engine | |
traefik: | |
hostname: traefik | |
image: traefik:latest | |
container_name: traefik | |
restart: always | |
domainname: ${DOMAINNAME} |
<style> | |
/* BASE RULES */ | |
html, body { | |
width: 100%; | |
height: 100%; | |
background-color: #ccccff; | |
} | |
div { |
// code courtesy of Toby team | |
chrome.storage.local.get("state", o => ( | |
((f, t) => { | |
let e = document.createElement("a"); | |
e.setAttribute("href", `data:text/plain;charset=utf-8,${encodeURIComponent(t)}`); | |
e.setAttribute("download", f); | |
e.click(); | |
})(`TobyBackup${Date.now()}.json`, o.state) | |
)); |
FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.