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
# Visual Studio Environemnt Loader | |
# | |
# For MSYS2/Cygwin/etc.. | |
# | |
# Set the following in your ~/.bashrc: | |
# | |
# ENVIRONMENT CONFIGURATION: | |
# | |
# To enable static linking where possible: | |
# |
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
--- | |
# | |
# This template example assumes a UserPool and UserPoolDomain exist. | |
# The function of this is to produce a custom resource with an attribute | |
# that can be referenced for DNSName of an Route53::RecordSet AliasTarget. | |
# | |
# AliasTarget: | |
# HostedZone: Z2FDTNDATAQYW2 | |
# DNSNAME: !GetAtt UPDomain.CloudFrontDistribution |
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
<?php | |
namespace finddef; | |
set_error_handler(function($errno, $errstr, $errfile, $errline, $errcontext) { echo "Execution error: {$errstr} on line {$errline} of {$errfile}" . PHP_EOL; exit; }); | |
function make_check_ident($ident) { | |
$ident = preg_quote($ident, '~'); | |
return function($no, $text) use($ident) { return 1 === preg_match("~\b{$ident}\b~", $text); }; | |
} |
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
#!/bin/sh | |
prepend_path() { | |
local _pname _pname_prepend="${1}" IFS=":" | |
for _pname in ${PATH}; do | |
if [ "${_pname}" = "${_pname_prepend}" ]; then | |
return | |
fi | |
done | |
export PATH="${_pname_prepend}${PATH:+:${PATH}}" |
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
Windows Registry Editor Version 5.00 | |
[-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\MSYS here] | |
[-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\MINGW64 here] | |
[-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\MINGW32 here] |
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
<?php | |
/* | |
* Custom PHP unserializer with better error reporting | |
* | |
* Does not support objects. | |
*/ | |
class Unserializer { | |
private $serialized; | |
private $len; |
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
#!/usr/bin/bash | |
scrape_db() { | |
local var=$1 | |
local file=$2 | |
local url=$3 | |
[ "$DB_UPDATE" != 'no' ] && wget -nv -O /tmp/$file $url >&2 | |
while read pkg ver; do |
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
#!/usr/bin/bash | |
ROOT="$(pwd)" | |
dl() { | |
local cookie="/tmp/pacman-mirror-cookie.txt" | |
touch "${cookie}" | |
local file |
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
#/usr/bin/sh | |
#http://www.drdobbs.com/tools/debugging-makefiles/197003338 | |
make --eval='print-%: ; @echo $* is $($*)' --eval='OLD_SHELL := $(SHELL)' --eval='SHELL = $(warning [$@ ($^) ($?)])$(OLD_SHELL) -x' | |
make V=1 VERBOSE=1 | |
make --dry-run |
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
typedef int(*fn)(); | |
int main() { | |
return ((fn)0)(); | |
} |
NewerOlder