- Open two windows with two YouTube tabs per window.
- Pause all videos.
- Open extensions tab and enable none or one lazy tab extension.
- Save test session in Session Buddy.
- Focus extensions tab and close Chrome.
- Open Chrome.
- If videos don't all play at the same time, OK, else FAIL.
- Close all but Session Buddy tab and restore test session.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Save as `/etc/init/webmon.conf` and start your daemon with `sudo service webmon restart`. Output is in `/var/log/upstart/webmon.log` | |
description "Website monitor" | |
start on (net-device-up IFACE!=lo) # Start when network is up. | |
respawn | |
respawn limit 2 120 # Respawn no more than twice in 120 seconds. | |
# adduser --home /home/webmon webmon | |
setuid webmon # Don't run as root. | |
setgid webmon | |
chdir /home/webmon # Find uploads etc relatively. | |
exec /home/webmon/webmon.py # Don't forget the #! and `chmod +x`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Checks memory percentage of first process by user name. | |
2015-06-04 v1.0 by Cees.Timmerman@nospam | |
Run with `python -m doctest mem_perc.py`. | |
>>> ps_tomcat = ['ps', 'u', '-U', 'tomcat6'] | |
>>> mem_perc(ps_tomcat) < 20 | |
True | |
>>> mem_perc(['ssh', 'other.host'] + ps_tomcat) < 20 | |
True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\code>meteor create --example todos | |
C:\code>npm install -g mup | |
C:\code>cd todos | |
C:\code\todos>mup init | |
C:\code\todos>git init | |
C:\code\todos>git add -A | |
C:\code\todos>git reset mup.json | |
C:\code\todos>echo mup.json> .gitignore | |
C:\code\todos>git commit -m "first commit" | |
C:\code\todos>npm -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteCond %{HTTP_HOST} !^www\.company\.com$ [NC] # nocase | |
RewriteRule (.*) https://www.company.com/$1 [NE,R=301,L] # noescape, redirect, last |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<NotepadPlus> | |
<UserLang name="Markdown" ext="md markdown" udlVersion="2.1"> | |
<Settings> | |
<Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" /> | |
<Prefix Keywords1="yes" Keywords2="yes" Keywords3="yes" Keywords4="yes" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" /> | |
</Settings> | |
<KeywordLists> | |
<Keywords name="Comments">00# 01 02 03<!-- 04--></Keywords> | |
<Keywords name="Numbers, prefix1"></Keywords> | |
<Keywords name="Numbers, prefix2"></Keywords> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS C:\meteor\simple-todos\output> npm install | |
npm WARN package.json simple-todos@0.0.1 No repository field. | |
npm WARN package.json simple-todos@0.0.1 No license field. | |
- | |
> fibers@1.0.5 install C:\meteor\simple-todos\output\node_modules\fibers | |
> node ./build.js | |
child_process: customFds option is deprecated, use stdio instead. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use LF EOLs, not CRLFs, or backup folder might get CR in its name. | |
rsync --timeout=60 -aP --append-verify --stats user@host:/folder /cygdrive/f/backup | |
echo Done `date` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem Run as admin. http://lifehacker.com/find-the-wi-fi-password-for-your-current-network-with-t-1717978747?utm_source=taboola | |
netsh wlan show profile name=networkname key=clear | |
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SVG2PNG | |
// By Cees Timmerman, 2024-04-05. | |
// Paste into console and adjust indices as needed. | |
let im = document.getElementsByTagName('img') | |
let fname = location.href | |
if (im.length < 1) { | |
let svg = document.getElementsByTagName('svg')[0] | |
let bb = svg.getBBox() | |
im = new Image(bb.width, bb.height) | |
im.src = 'data:image/svg+xml;charset=utf-8;base64,' + btoa(document.getElementsByTagName('svg')[0].outerHTML) |