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 is a workaround to a game forgetting the 'fullscreen setting' | |
# The fullscreen option can be applied to any window, it works like the "maximize" button on the window bar afaik | |
# The game must be launched on the current virtual desktop for this to work. | |
#!/bin/bash | |
twom-fullscreen () | |
{ | |
local _twm=$(wmctrl -l | grep 'This War of Mine'$ | awk '{ print $1 }'); | |
wmctrl -i -r $_twm -b add,fullscreen; | |
wmctrl -i -a $_twm |
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
# copy this into ~/.ssh/config or create a new file there | |
# fortrabbit example ssh setup | |
Host deploy.*.frbit.com log.*.frbit.com tunnel.*.frbit.com | |
# You need to uncomment (remove #) these two lines if you are using an rsa-based key (id_rsa) | |
#PubkeyAcceptedKeyTypes +ssh-rsa | |
#HostKeyAlgorithms +ssh-rsa | |
#IdentityFile ~/.ssh/id_rsa_fortrabbit | |
#IdentityFile ~/.ssh/id_fortrabbit |
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
git clone https://github.com/php/php-src.git | |
cd php-src | |
git tag \ | |
| grep -Eo 'php-([0-9]+\.?){3}$' \ | |
| sort -ut. -k1.5,1n -k2,2n -k3,3n \ | |
| while read tag; do | |
echo $tag ` | |
git show $tag:main/php.h | sed -n ' /#define PHP_API_VERSION /{ s///; p; q } ' | |
` ` |
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/bash | |
declare -a subjects=() | |
cdupe() { grep -i begin.cert -A 3 ${1:-} | sort -u | wc -l ; } | |
for i in /etc/frbitx/container/haproxy/certs/*; | |
do | |
uniq_lines=`cdupe $i`; | |
if [[ $uniq_lines == 5 ]]; then | |
subject=$(openssl x509 -noout -in $i -subject | | |
awk '{ print $(NF)}') | |
echo broken: $i $subject |
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 | |
/* | |
* Generate a manifest: | |
* | |
* php clean-dirs.php save vendor | |
* git add .present.vendor # optional, may be rsynced/uploaded to document root | |
*/ | |
/** pretend to generate some assets */ |
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 | |
/** | |
* Plugin Name: LHF Volunteer Form | |
* Description: Manages a google-sheet full of names and emails | |
* Plugin URI: http://ladehammerfestivalen.no/volunteer | |
* Author URI: http://genja.org | |
* Author: jazzoslav@gmail.com | |
* Text Domain: lhf-volunteer-form | |
* Domain Path: /languages |
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 | |
/* | |
* Service-registration with the command design-pattern: | |
* For details, see: http://www.oodesign.com/command-pattern.html | |
* | |
* A notable deviation from recommended approach in this implementation; | |
* A command (RegistrationTask) does most of the work. The recommended structure | |
* is to do the expensive work in the Receiver (taskReceiver). | |
* |
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
# basic file manipulation, etc | |
alias cd....='cd ../..' | |
alias cd...='cd ../..' | |
alias cd..='cd ..' | |
alias cd.='cd .' | |
alias cd~='cd ~' | |
alias ....='cd ../..' | |
alias ...='cd ../..' | |
alias ..='cd ..' | |
alias ~='cd ~' |
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_CLASSES_ROOT\Directory\shell\mintty] | |
@="Mintty" | |
"NoWorkingDirectory"="" | |
[HKEY_CLASSES_ROOT\Directory\shell\mintty\command] | |
@="C:\\cygwin64\\bin\\mintty.exe -h always -e /usr/bin/ash -c 'cd \"$(/usr/bin/cygpath \"%L\")\"; exec /usr/bin/bash '" | |