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
pubtst |
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
# Assuming an Ubuntu Docker image | |
$ docker run -it <image> /bin/bash |
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 | |
### it will call 'inspect' on found docker volumes by default, you can delete them providing 'rm' as parameter | |
docker_volume_action=${1:-inspect} | |
#echo $docker_volume_action | |
docker volume ls -qf dangling=true | xargs -r docker volume $docker_volume_action | |
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 | |
# print duplicated lines only once without need of sorted input | |
awk '!seen[$0]++' $@ |
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
// vpnc-script-win.js | |
// | |
// Sets up the Network interface and the routes | |
// needed by vpnc. | |
var internal_ip4_netmask = "255.255.255.0"; | |
var ws = WScript.CreateObject("WScript.Shell"); | |
var env = ws.Environment("Process"); | |
var comspec = ws.ExpandEnvironmentStrings("%comspec%"); |
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
rem From: https://superuser.com/a/301026/952328 and https://stackoverflow.com/a/7366200/3295944 | |
rem Official setup has command line arguments: https://cygwin.com/faq/faq.html#faq.setup.cli | |
rem Cygwin package list: https://cygwin.com/packages/package_list.html | |
rem Cygwin package search: https://cygwin.com/cgi-bin2/package-grep.cgi | |
setup-x86_64.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode --root "%cd%" --packages %* |
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/python2.7 | |
### allows to send data to STDIN of another process already running having STDIN attached to terminal | |
### FROM: https://stackoverflow.com/a/29616465/3295944 | |
### but it doesn't work (fail process command line argument), but fixed here | |
''' | |
Here is how you use it: |
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 | |
to_user=$1 | |
xauth extract - $DISPLAY | sudo env -i su ${to_user} -c 'xauth merge -' |
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 | |
# apt install exe-thumbnailer gridsite-clients | |
exe_file=$1 | |
exe_file_abs=$(readlink -f "$exe_file") | |
output_file="${exe_file_abs}.png" | |
exe_file_url="file://$(urlencode -m "$exe_file_abs")" | |
set -x | |
echo "" | /usr/bin/exe-thumbnailer "$exe_file_abs" "$output_file" "$exe_file_url" || exit 1 | |
set +x | |
echo "Created: $output_file" |
OlderNewer