This file contains hidden or 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
| # 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 ))]}" |
This file contains hidden or 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
| <?php | |
| class RetryTest extends TestCase | |
| { | |
| public function setUp() | |
| { | |
| parent::setUp(); | |
| // abuse superglobal to keep track of state | |
| $_GET['a'] = 0; | |
| } |
This file contains hidden or 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
| #!/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 . |
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| # 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: |
This file contains hidden or 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
| // ==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== |
This file contains hidden or 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
| #!/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 | |
| ---------------------------------------- |
This file contains hidden or 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
| 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): |
This file contains hidden or 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
| ## 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> |
This file contains hidden or 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
| 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. |