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
[bash] brennen@inertia 23:38:02 ~/fragments/xargs-alias (master m0/u0) $ ls | |
example_selection files.lftp lst.sh | |
[bash] brennen@inertia 23:38:06 ~/fragments/xargs-alias (master m0/u0) $ cat example_selection | |
Datach'i - Bonus - 01 Aldebaran.mp3 | |
Datach'i - Bonus - 02 Something.mp3 | |
[bash] brennen@inertia 23:38:08 ~/fragments/xargs-alias (master m0/u0) $ cat lst.sh | |
function lst { | |
echo -n '' > files.lftp | |
sed "s/'/\\\'/" example_selection | while read -r fname; do | |
printf "put '%s'\n" "$fname" >> files.lftp |
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
brennen@inertia 14:31:49 ~/fragments (master m2/u4) ▣ cat func-stdin.sh | |
#!/bin/sh | |
myread () { | |
while read foo; do | |
echo "$foo"; | |
done | |
} | |
cat /etc/motd | myread |
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
FROM docker-registry.wikimedia.org/dev/stretch-php72-apache2 | |
RUN groupadd -o -g "65533" -r "somebody" && useradd -o -m -d "/home/somebody" -r -g "somebody" -u "65533" "somebody" && mkdir -p "/var/www/html" && chown "65533":"65533" "/var/www/html" | |
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer | |
WORKDIR /var/www/html/ | |
COPY --chown=65533:65533 [".", "."] |
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
brennen@inertia 16:57:39 ~/code/wmf/releng/dev-images (master 0/0) ▣ make | |
docker-pkg --info -c dockerfiles/config.yaml build dockerfiles | |
Traceback (most recent call last): | |
File "/home/brennen/.local/lib/python3.5/site-packages/urllib3/contrib/pyopenssl.py", line 453, in wrap_socket | |
cnx.do_handshake() | |
File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1426, in do_handshake | |
self._raise_ssl_error(self._ssl, result) | |
File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1174, in _raise_ssl_error | |
_raise_current_error() | |
File "/usr/lib/python3/dist-packages/OpenSSL/_util.py", line 48, in exception_from_error_queue |
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 works when run from a shell: | |
#!/bin/sh | |
tmpfile=`mktemp /tmp/edit-clipboard.XXXXXX` | |
xclip -d localhost:1 -o > "$tmpfile" | |
"$EDITOR" "$tmpfile" | |
xclip -d localhost:1 -i "$tmpfile" | |
rm "$tmpfile" | |
# This doesn't work: |
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/env python | |
from imapclient import IMAPClient | |
import time | |
import RPi.GPIO as GPIO | |
DEBUG = True | |
HOSTNAME = 'imap.gmail.com' |
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/env php | |
<?php | |
define('LIBDIR', 'lib/'); | |
require LIBDIR . 'classes/SparkLib/Autoloader.php'; | |
SparkLib\Autoloader::setup(); | |
use FeedWriter\Feed; | |
use FeedWriter\View\JSON; | |
use FeedWriter\View\XML; | |
use FeedWriter\View\CSV; |
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/env perl | |
use LWP::Simple; | |
$page = get('http://www.bvsd.org/'); | |
if ($page =~ /troublebutton/m) { | |
print "yes.\n"; | |
} else { | |
print "sorry.\n"; | |
} |
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
^ # start | |
( | |
(?U) # ??? - named capture group? | |
.+ # one or more of anything | |
\.php) # a literal ".php", but why the fuck is there a paren at the end of 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
(function( $ ){ | |
var methods = { | |
init : function (options) { | |
}, | |
render : function (target, data, labels, color) { | |
if (! (target && target.getContext)) |
NewerOlder