(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
# LICENSE: MIT, wtfpl or whatever OSS license you like | |
function get_stack () { | |
STACK="" | |
local i message="${1:-""}" | |
local stack_size=${#FUNCNAME[@]} | |
# to avoid noise we start with 1 to skip the get_stack function | |
for (( i=1; i<$stack_size; i++ )); do | |
local func="${FUNCNAME[$i]}" | |
[ x$func = x ] && func=MAIN | |
local linen="${BASH_LINENO[$(( i - 1 ))]}" |
<?php | |
class RetryTest extends TestCase | |
{ | |
public function setUp() | |
{ | |
parent::setUp(); | |
// abuse superglobal to keep track of state | |
$_GET['a'] = 0; | |
} |
#!/bin/bash | |
# Mark Ziesemer, 2016-02-11, 2016-12-14. | |
# As described at https://rhn.redhat.com/errata/RHSA-2015-2088.html , | |
# I'm afraid that the race condition with OpenSSH ControlMaster multiplexing is still not resolved | |
# in recent CentOS / Fedora releases. | |
# This refers to BZ#1240613 (which is apparently restricted), and is also described at | |
# https://access.redhat.com/solutions/1521923 (which is non-public, restricted to subscription access). | |
# Reported to https://bugzilla.redhat.com/show_bug.cgi?id=1308295 on 2016-02-13 . |
function Install-Cygwin { | |
param ( $CygDir="c:\cygwin", $arch="x86") | |
# Generate random password (forcing a non-alphanumeric at the end because of policies | |
$password = (([char[]]([char]'a'..[char]'z') + 0..9 | sort {get-random})[0..12] -join '') + '.' | |
Write-Verbose "Not-so-secret password: $password" | |
if(!(Test-Path -Path $CygDir -PathType Container)) { | |
Write-Verbose "Creating directory $CygDir" | |
New-Item -Type Directory -Path $CygDir -Force |
# https://docs.docker.com/compose/yml/ | |
# Each service defined in docker-compose.yml must specify exactly one of | |
# image or build. Other keys are optional, and are analogous to their | |
# docker run command-line counterparts. | |
# | |
# As with docker run, options specified in the Dockerfile (e.g., CMD, | |
# EXPOSE, VOLUME, ENV) are respected by default - you don't need to | |
# specify them again in docker-compose.yml. | |
# | |
service_name: |
// ==UserScript== | |
// @name GM_download emulation | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description emulate GM_download functionality | |
// @require https://github.com/eligrey/FileSaver.js/raw/master/FileSaver.js | |
// @match http://tampermonkey.net/empty.html | |
// @grant GM_xmlhttpRequest | |
// @copyright 2014, Jan Biniok | |
// ==/UserScript== |
#!/bin/bash | |
version=1.0.1 | |
versionDate="2014-02-14" | |
function showHelp() { | |
echo "watchfile - monitor file(s)/command and perform action when changed | |
Possible ways of usage | |
---------------------------------------- |
def update(dl_url, force_update=False): | |
""" | |
Attempts to download the update url in order to find if an update is needed. | |
If an update is needed, the current script is backed up and the update is | |
saved in its place. | |
""" | |
import urllib | |
import re | |
from subprocess import call | |
def compare_versions(vA, vB): |
## projectName | |
<VirtualHost *:80> | |
ServerName projectName.local.plou | |
CustomLog "/www/.logs/projectName.local.plou-access_log" combined | |
ErrorLog "/www/.logs/projectName.local.plou-error_log" | |
DocumentRoot "/www/projectName/" | |
Header set Access-Control-Allow-Origin "*" | |
Header always set Access-Control-Allow-Methods "POST, PUT, GET, DELETE, OPTIONS" | |
Header always set Access-Control-Allow-Headers "Content-Type" | |
</VirtualHost> |