Skip to content

Instantly share code, notes, and snippets.

@HanSooloo
HanSooloo / Dockerfile
Last active April 12, 2020 20:12
certbot-Dockerfile
FROM python:3.8-alpine
LABEL maintainer="Selim Baygin <selimbaygin@gmail.com>"
# VOLUME
ARG CERTBOT_VERSION
ENV CERTBOT_VERSION=${CERTBOT_VERSION}
WORKDIR /opt/certbot
@HanSooloo
HanSooloo / TrueTone.scpt
Created April 8, 2020 23:29
AppleScript to change TrueTone
tell application "System Events"
if (get name of every application process) contains "System Preferences" then
set _isSysPrefRunning to true
else
set _isSysPrefRunning to false
end if
end tell
log _isSysPrefRunning
use sys : application "System Events"
@HanSooloo
HanSooloo / NightShift.scpt
Last active April 9, 2020 00:08
AppleScript to change NightShift state
tell application "System Events"
if (get name of every application process) contains "System Preferences" then
set _isSysPrefRunning to true
else
set _isSysPrefRunning to false
end if
end tell
log _isSysPrefRunning
use sys : application "System Events"

Keybase proof

I hereby claim:

  • I am hansooloo on github.
  • I am hansooloo (https://keybase.io/hansooloo) on keybase.
  • I have a public key ASBaibJzRvM4N3Dn0dOTBSvcnW3JLCVFd-rNzTtXc9joJwo

To claim this, I am signing this object:

tmux start-server
TMUX= tmux new-session -d -s converter_job -n jobs
tmux set-window-option -g -t converter_job:0 pane-border-status top
tmux set-window-option -g -t converter_job:0 -F pane-border-format "Job #P: #{pane_current_command}"
tmux split-window -t converter_job:0
tmux select-layout -t converter_job:0 tiled
tmux split-window -t converter_job:0
from cryptography import x509
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography.x509.oid import NameOID
import datetime
one_day = datetime.timedelta(1, 0, 0)
private_key = rsa.generate_private_key(
public_exponent=65537,
@HanSooloo
HanSooloo / # mkvtoolnix - 2018-12-23_19-24-03.txt
Created January 4, 2019 15:40
mkvtoolnix on macOS 10.14.2 - Homebrew build logs
Homebrew build logs for mkvtoolnix on macOS 10.14.2
Build date: 2018-12-23 19:24:03
debug 11:51:53.968128 -0500 iTerm2 Resource lookup at <private>
Request : SUStatus type: nib
Result : file:///Applications/iTerm.app/Contents/Frameworks/Sparkle.framework/Resources/SUStatus.nib
debug 11:51:53.984217 -0500 iTerm2 Resource lookup at <private>
Request : Sparkle type: strings
Result : file:///Applications/iTerm.app/Contents/Frameworks/Sparkle.framework/Resources/en.lproj/Sparkle.strings
debug 11:51:53.984266 -0500 iTerm2 Resource lookup at <private>
Request : Sparkle type: stringsdict
Result : None
debug 11:51:53.984495 -0500 iTerm2 Bundle: <private>, key: Updating %@, value: , table: Sparkle, localizationName: (null), result: Updating %@
@HanSooloo
HanSooloo / convert_eventscripter.sh
Created August 9, 2018 20:58
JDownloader EvenScripter Config Generator
#!/bin/sh
#
# Convert an Event Scripter source to a config JSON
# $1: location of EventScripter files
# Need 'gsed' on macOS to behave like its Linux counterpart
if [[ $(uname) == "Darwin" ]]; then
SED="gsed"
else
jd@plex:/mnt/JDownloader$ cat /mnt/JDownloader/hs_err_pid17995.log
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f25830f146b, pid=17995, tid=0x00007f24dfefe700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_181-b13) (build 1.8.0_181-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.181-b13 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V [libjvm.so+0x71546b] JNIHandleBlock::allocate_block(Thread*)+0x7b