ftp -o - https://jcs.org/move_in | sh -
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

bin: add some random things I had in here

+97
+11
bin/binary
··· 1 + #!/usr/bin/env ruby 2 + 3 + if !ARGV[0] 4 + puts "usage: #{$0} 0x12345" 5 + exit 1 6 + end 7 + 8 + num = ARGV[0].to_s.to_i(ARGV[0].match(/^0x/) ? 16 : 10) 9 + b = sprintf("%b", num) 10 + pad = ((b.length / 8.0).ceil * 8) - b.length 11 + puts "#{"0" * pad}#{b}"
+4
bin/exifstrip
··· 1 + #!/bin/sh 2 + 3 + exiftool -stay_open true -overwrite_original \ 4 + -all= -tagsfromfile $1 -Orientation $1
+38
bin/irc
··· 1 + #!/bin/sh 2 + 3 + while :; do 4 + host jcs.org > /dev/null 2>&1 5 + if [ $? -eq 0 ]; then 6 + 7 + env SSH_AUTH_SOCK= ssh -t \ 8 + -o ServerAliveInterval=5 \ 9 + -o ServerAliveCountMax=3 \ 10 + -o ForwardAgent=no \ 11 + -o AddKeysToAgent=no \ 12 + -i ~/.ssh/id_chat_ed25519 \ 13 + chat@jcs.org "tmux -u new-session -A -s main" 14 + 15 + if [ X"$?" = X"0" ]; then 16 + exit 17 + fi 18 + 19 + # wait until screen is not locked 20 + sleep 1 21 + if [ X`uname -s` = X"Darwin" ]; then 22 + python -c 'import sys, Quartz, time 23 + while True: 24 + d = Quartz.CGSessionCopyCurrentDictionary() 25 + if d.get("CGSSessionScreenIsLocked", 0) == 0: 26 + sys.exit(0) 27 + time.sleep(0.5) 28 + ' 29 + elif [ X`uname -s` = X"OpenBSD" ]; then 30 + sleep 1 31 + while [ X`pgrep slock` != X"" ]; do 32 + sleep 1 33 + done 34 + fi 35 + fi 36 + 37 + sleep 2 38 + done
+7
bin/localtime
··· 1 + #!/usr/bin/env ruby 2 + 3 + require "date" 4 + 5 + dt = DateTime.parse(ARGV[0]) 6 + puts "#{dt.to_time} (#{dt.zone}) -> " + 7 + "#{dt.new_offset(Time.now.zone).to_time} (#{Time.now.zone})"
+5
bin/plan
··· 1 + #!/bin/sh 2 + 3 + T=`mktemp` && curl -so $T https://plan.cat/~`whoami` && \ 4 + $EDITOR $T && \ 5 + curl -su `whoami` -F "plan=<$T" https://plan.cat/stdin
+27
bin/randpass
··· 1 + #!/usr/bin/env ruby 2 + 3 + require "openssl" 4 + 5 + len = ARGV[0].to_i 6 + if len == 0 7 + len = 8 8 + end 9 + 10 + str = "" 11 + 12 + while str.length < len 13 + while str.length < len 14 + chr = OpenSSL::Random.random_bytes(1) 15 + ord = chr.unpack('C')[0] 16 + 17 + # 0 9 a z 18 + if (ord >= 48 && ord <= 57) || (ord >= 97 && ord <= 122) 19 + # avoid ambiguous characters 20 + next if chr == "0" || chr == "l" 21 + 22 + str << chr 23 + end 24 + end 25 + end 26 + 27 + puts str
+5
bin/randword
··· 1 + #!/bin/sh 2 + 3 + DICT=/usr/share/dict/words 4 + 5 + sort -R $DICT | head -n1