Skip to content

Instantly share code, notes, and snippets.

@HanSooloo
HanSooloo / Dockerfile
Last active Apr 12, 2020
certbot-Dockerfile
View 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 Apr 8, 2020
AppleScript to change TrueTone
View TrueTone.scpt
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 Apr 9, 2020
AppleScript to change NightShift state
View NightShift.scpt
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"
View keybase.md

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:

View tmux_setup.sh
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
View cryptography_extension_test.py
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 Jan 4, 2019
mkvtoolnix on macOS 10.14.2 - Homebrew build logs
View # mkvtoolnix - 2018-12-23_19-24-03.txt
Homebrew build logs for mkvtoolnix on macOS 10.14.2
Build date: 2018-12-23 19:24:03
View untitled
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 Aug 9, 2018
JDownloader EvenScripter Config Generator
View convert_eventscripter.sh
#!/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
View hs_err_pid17995.log
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