Skip to content

Instantly share code, notes, and snippets.

for muh in `find ep/posts`; do echo $muh; url=`cat $muh |json_pp| grep '"url" : "https://'|awk '{print $3}'|sed s,\",,g| sed "s,asset/\([0-9]*\)/\([0-9]*\)_\([0-9a-f]*\)\(_[0-9]*\)\?\.\([a-z]*\),asset/\1/\2_\3.\5,g" |sed s/,$//`; fn=`echo $url |sed -e s,https://asset.soup.io/,,g -e s,/,_,g`; test $url && wget -q $url -O $fn; done 2> /dev/null
@elpollodiablo
elpollodiablo / quick_action_seafile
Last active April 18, 2020 19:10
Share with Seafile Quick Action
#/bin/bash
####################################################################
# Configure a quick action to share a file from finder and
# get a sharable link in clipboard
####################################################################
# On Seafile:
# - create a library (repo) that suits your sharing needs
# On Terminal:
# - get $AUTH_TOKEN:
#!/bin/sh
# podmanager
# URLBASE="https://admin:admin@10.8.2.121:8443"
URLBASE="https://root:calvin@10.8.2.123"
URLS="$URLBASE/redfish/v1"
while true;
do
NEWURLS=""
for URL in $URLS;
mkdir initrd-adapt
cd initrd-adapt/
wget http://cdimage.debian.org/cdimage/unofficial/non-free/firmware/jessie/current/firmware.tar.gz
mkdir firmware
tar -C firmware -zxf firmware.tar.gz
%staff ALL=NOPASSWD: /usr/local/bin/sshfs
poten.at -fstype=sshfs,defer_permissions,allow_other,auto_cache,idmap=user,uid=501,gid=20 philip@www.poten.at:/data
%wheel ALL=NOPASSWD: /usr/local/bin/sshfs
@elpollodiablo
elpollodiablo / mount_sshfs
Created November 12, 2016 09:51
/sbin/mount_sshfs
#!/bin/sh
sudo /usr/local/bin/sshfs $@
@elpollodiablo
elpollodiablo / gist:9584857
Last active August 29, 2015 13:57
logging new external ip and/or network breakage
oldip="" ; while true; do myip=`curl -s http://amd.co.at/ip.php` || (echo "`date` network breakage") ; test "$myip" = "$oldip" || (echo "`date` new ip: $myip"); oldip=$myip; sleep 1; done
# Snatching a screenshot from a VXI11/LXI/SCPI device (tested on Rigol DS2072)
import vxi11, datetime
instr = vxi11.Instrument("192.168.0.22")
f=open(datetime.datetime.now().strftime("%Y-%m-%d_%H:%M:%S") + ".bmp", "w")
f.write(instr.ask_raw(":DISPlay:DATA?")[11:])