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
#!/usr/bin/env bash | |
i=0 | |
while [ $i -lt 40 ]; do | |
/usr/bin/docker ps | head -n 1 | grep ^CONTAINER > /dev/null 2>&1 | |
[ $? -eq 0 ] && break | |
((i++)) | |
sleep 0.5 | |
done | |
[ $i -eq 40 ] && exit 1 | |
exit 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
/** | |
* Print Stylesheet fuer Deinewebsite.de | |
* @version 1.0 | |
* @lastmodified 16.06.2016 | |
*/ | |
@media print { | |
/* Inhaltsbreite setzen, Floats und Margins aufheben */ | |
/* Achtung: Die Klassen und IDs variieren von Theme zu Theme. Hier also eigene Klassen setzen */ |
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
# File: /etc/supervisor/conf.d/10-lircd.conf | |
# Replace "04d8:f58b" with the id of your device (use "lsusb") | |
[program:lircd] | |
command=lircd-fix 04d8:f58b --lircd-options="--nodaemon --device=/dev/ttyACM0" | |
autorestart=true |
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
" Usage: | |
" nmap <silent> <leader>; :call ToggleLineEnding(';')<CR> | |
" imap <silent> <leader>; <Esc>:call ToggleLineEnding(';')<CR>a | |
function! ToggleLineEnding(char) | |
let l:line = getline('.') | |
if (strpart(l:line, strlen(l:line) - 1) == a:char) | |
let l:toggledLine = substitute(l:line, a:char . '$', '', '') | |
else |
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 | |
function imagealphamask( &$picture, $mask ) { | |
// Get sizes and set up new picture | |
$xSize = imagesx( $picture ); | |
$ySize = imagesy( $picture ); | |
$newPicture = imagecreatetruecolor( $xSize, $ySize ); | |
imagesavealpha( $newPicture, true ); | |
imagefill( $newPicture, 0, 0, imagecolorallocatealpha( $newPicture, 0, 0, 0, 127 ) ); | |