Create Bookmarklet (browser bookmark that executes Javsacript) to copy a given text to Clipboard.
This is the base javascript:
(function (text) {
var node = document.createElement('textarea')
var selection = document.getSelection()
# Configuration file for varnish | |
# | |
# This file is stored in ansible | |
START=yes | |
NFILES=131072 | |
MEMLOCK=82000 | |
DAEMON_OPTS="-a :6081 \ | |
-p thread_pool_add_delay=2 \ |
From 473846959772d8160b34b92ae3bcecddf24b972f Mon Sep 17 00:00:00 2001 | |
From: =?UTF-8?q?Julian=20Nu=C3=9F?= <[email protected]> | |
Date: Tue, 23 Sep 2014 21:07:29 +0200 | |
Subject: [PATCH 1/1] [BUGIFX] Zend Framework 1 + PHP5.6 | |
--- | |
lib/Zend/Locale/Format.php | 22 +++++++++++----------- | |
lib/Zend/Service/Audioscrobbler.php | 6 +++--- | |
lib/Zend/Service/Technorati.php | 6 +++--- | |
lib/Zend/Validate/Hostname.php | 4 ++-- |
#!/bin/sh | |
# Cleanup docker files: untagged containers and images. | |
# | |
# Use `docker-cleanup -n` for a dry run to see what would be deleted. | |
untagged_containers() { | |
# Print containers using untagged images: $1 is used with awk's print: 0=line, 1=column 1. | |
# NOTE: "[0-9a-f]{12}" does not work with GNU Awk 3.1.7 (RHEL6). | |
# Ref: https://github.com/blueyed/dotfiles/commit/a14f0b4b#commitcomment-6736470 | |
docker ps -a | tail -n +2 | awk '$2 ~ "^[0-9a-f]+$" {print $'$1'}' |
#!/usr/bin/env python | |
import requests | |
import argparse | |
import datetime | |
import uuid | |
parser = argparse.ArgumentParser() | |
parser.add_argument('base_url', type=str, help="The base url of the shop, e.g. http://amsterdamflowers.nl/") | |
args = parser.parse_args() |
package Byte:::Apache2::RewriteURI; | |
use strict; | |
use warnings; | |
use Apache2::RequestRec (); | |
use Apache2::Const -compile => qw(DECLINED); | |
sub handler { | |
my $r = shift; |
sudo perl -pi -e 's/^use-ssh-agent/#use-ssh-agent/g;' /etc/X11/Xsession.options | |
echo 'if [ -n "$GNOME_KEYRING_PID" ]; then eval `gnome-keyring-daemon --start`; export SSH_AUTH_SOCK; fi' > ~/.xprofile |
```bash | |
sudo gpg --no-default-keyring --keyring /usr/share/keyrings/ubuntu-archive-keyring.gpg --keyserver keyserver.ubuntu.com --recv-keys 6FB2A1C265FFB764 | |
sudo DIST=wheezy ARCH=amd64 git-pbuilder create --mirror=http://ftp.nl.debian.org/debian/ | |
``` |
class TestNamedTemporaryFile(TestCase): | |
def setUp(self): | |
# set up the mock | |
# you could use ByteTestCase when you are at byte.nl ;) | |
mockobj = mock.Mock() | |
patcher = mock.patch("tempfile.NamedTemporaryFile", mockobj) | |
self.addCleanup(patcher.stop) | |
patcher.start() |