Reference(s):
http://www.sourcegear.com/diffmerge/downloads.php - get the installer version, NOT the dmg version
<html> | |
<head> | |
<!-- | |
@tag hta:application | |
@attribute ApplicationName Sets the name of the HTA. | |
@attribute Border [Thick]|Thin|None | |
@attribute BorderStyle [Normal]|Raised|Sunken|Complex|Static | |
@attribute Caption [Yes]|No |
javascript:(_ => { | |
const sheet = document.createElement('style'); | |
sheet.innerHTML = 'img { image-rendering: pixelated; }'; | |
document.head.appendChild(sheet); | |
for(let i = 0; i < frames.length; ++i) { | |
frames[i].document.head.appendChild(sheet); | |
} | |
})() |
#!/bin/bash | |
# To run this script you need to give execute permission. | |
# $chmod +x restart_bluetooth.sh; | |
# If you want only to restart: | |
# $ ./restart_bluetooth.sh; | |
# If you want to turn bluetooth on; | |
# $ ./restart_bluetooth.sh 1; | |
# If you want to turn bluetooth off; | |
# $ ./restart_bluetooth.sh 0; |
Reference(s):
http://www.sourcegear.com/diffmerge/downloads.php - get the installer version, NOT the dmg version
#!/bin/bash | |
################# | |
### Variables ### | |
################# | |
# Items at the system level to be removed | |
systemItems=( | |
/Applications/Transmission.app | |
/Library/Application\ Support/com.apple.iCloud.sync.daemon/ |
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.
http://apassant.net/2012/01/16/timeout-for-html5-localstorage/ | |
var hours = 24; // Reset when storage is more than 24hours | |
var now = new Date().getTime(); | |
var setupTime = localStorage.getItem('setupTime'); | |
if (setupTime == null) { | |
localStorage.setItem('setupTime', now) | |
} else { | |
if(now-setupTime > hours*60*60*1000) { | |
localStorage.clear() |
Here are some simple ways to make your PICO-8 code fit in 140 280 characters (as in the #tweetjam #tweetcart craze). I did not invent these, I merely observed and collected them from the tweetjam thread.
x=.1
and x=.023
, not x=0.1
or x=0.023
x=1/3
is shorter than x=.3333
circ(x,y,1)pset(z,q,7)
works just as wellAt some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.
git commit --amend
This will open your $EDITOR
and let you change the message. Continue with your usual git push origin master
.
/** | |
* Print Stylesheet fuer Deinewebsite.de | |
* @version 1.0 | |
* @lastmodified 16.06.2016 | |
*/ | |
@media print { | |
/* Inhaltsbreite setzen, Floats und Margins aufheben */ | |
/* Achtung: Die Klassen und IDs variieren von Theme zu Theme. Hier also eigene Klassen setzen */ |