(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:
| function ltrim(s) { sub(/^[ \t\r\n]+/, "", s); return s } | |
| function rtrim(s) { sub(/[ \t\r\n]+$/, "", s); return s } | |
| function trim(s) { return rtrim(ltrim(s)); } | |
| BEGIN { | |
| # whatever | |
| } | |
| { | |
| # whatever | |
| } | |
| END { |
| This is a bunch of stuff relating to the localhost ip taken off bash.org. Apologies to all the non-technically minded people... | |
| #60852 | |
| <Numi> hey, can you guys just check a site out and tell me if it's up? | |
| <Haddock> depends, what is it? | |
| <Numi> just my apache server, it works for me but seems to be down for anyone else | |
| <Haddock> alright, what's the address? | |
| <Numi> http://127.0.0.1 | |
| <Haddock> ...... | |
| <Haddock> ...Yeah, it's up. |
| ## 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> |
| 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): |
| #!/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 | |
| ---------------------------------------- |
| // ==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== |
| # 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: |
| 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 |
| #!/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 . |