Skip to content

Instantly share code, notes, and snippets.

View kafran's full-sized avatar
🏠
WFH

Kolmar Kafran kafran

🏠
WFH
View GitHub Profile
foo bar baz
a 1
b 2
c
4
e 5
<details>
<summary>Detail information:</summary>
```
Opening: /home/kafran/Dropbox/PPGP/Docear/projects/PPGP/_data/15A06A9812F266QCVN96A7OXRBJEXYVIJOMS/default_files/PPGP.bib
Uncaught exception Occurred in Thread[AWT-EventQueue-0,6,main]
com.google.common.util.concurrent.UncheckedExecutionException: java.time.format.DateTimeParseException: Text 'D:20170512224019-03'00'' could not be parsed at index 0
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2217)
at com.google.common.cache.LocalCache.get(LocalCache.java:4154)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4158)
@kafran
kafran / 01_add_extra_repos.sh
Last active October 10, 2017 02:14 — forked from xenialaq/essential_packages.sh
Ubuntu Setup (Ubuntu MATE 17.04)
#!/bin/bash
cd /tmp && \
/usr/lib/apt/apt-helper download-file http://debian.sur5r.net/i3/pool/main/s/sur5r-keyring/sur5r-keyring_2017.01.02_all.deb keyring.deb SHA256:4c3c6685b1181d83efe3a479c5ae38a2a44e23add55e16a328b8c8560bf05e5f && \
sudo dpkg -i ./keyring.deb && \
echo "deb http://debian.sur5r.net/i3/ $(grep '^DISTRIB_CODENAME=' /etc/lsb-release | cut -f2 -d=) universe" | sudo tee /etc/apt/sources.list.d/sur5r-i3.list && \
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886 0DF731E45CE24F27EEEB1450EFDC8610341D9410 && \
echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list && \
sudo apt-get update && \
@kafran
kafran / i3config
Created October 12, 2017 12:20
Ubuntu Mate + i3 configuration files
# .config/i3/config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
@kafran
kafran / Compton Disabled
Last active October 16, 2017 01:06
Output of mate-screensaver-command -a with Compton enabled and disabled on an i3wm session
kafran@i5447:~$ mate-screensaver --no-daemon --debug
[gs_debug_init] gs-debug.c:109 (22:05:25): Debugging enabled
[main] mate-screensaver.c:92 (22:05:25): initializing mate-screensaver 1.18.0
[init_session_id] gs-listener-dbus.c:2406 (22:05:25): Got session-id: /org/freedesktop/login1/session/c2
[gs_fade_init] gs-fade.c:908 (22:05:25): Fade type: 3
** (mate-screensaver:4347): WARNING **: Failed to get session presence proxy: Could not get owner of name 'org.gnome.SessionManager': no such name
[gs_watcher_set_active] gs-watcher-x11.c:289 (22:05:25): turning watcher: ON
[listener_dbus_handle_system_message] gs-listener-dbus.c:1633 (22:05:25): obj_path=/org/freedesktop/DBus interface=org.freedesktop.DBus method=NameAcquired destination=:1.776
[on_bg_changed] gs-manager.c:1038 (22:05:25): background changed
@kafran
kafran / 01-Scan.sh
Created June 12, 2018 15:13
Script for scanning with Kodak ScanMate i1150
#!/bin/bash
# PATH TO THE SCRIPT FOLDER
BASE="/home/user/ScanFolder"
START=0
if [ -z "$1" ]; then
echo "Usage: $0 <jobid> <start_page>"
echo
echo "Please provide unique jobid name as first parameter"
@kafran
kafran / abnt-changed.cbx
Created August 18, 2018 20:45
Modificação no abnt.cbx para desambiguação
--- /home/kafran/Downloads/biblatex-abnt-3.1/latex/cbx/abnt.cbx
+++ /home/kafran/Downloads/biblatex-abnt-3.1/latex/cbx/abnt-changed.cbx
@@ -70,12 +70,12 @@
{\namepartgiveni}%
{\namepartprefix}%
{\namepartsuffixi}}%
- {\usebibmacro{name:given-family}%
+ {\usebibmacro{name:family-given}%
{\iftoggle{sccite}%
{\textsc{\MakeLowercase{\namepartfamily}}}%
@kafran
kafran / extract_har.py
Last active November 3, 2023 20:04
Python 3 script to extract images from HTTP Archive (HAR) files
import json
import base64
import os
# make sure the output directory exists before running!
folder = os.path.join(os.getcwd(), "imgs")
with open("scr.har", "r") as f:
har = json.loads(f.read())
@kafran
kafran / tmux-cheatsheet.markdown
Created April 26, 2020 04:24 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@kafran
kafran / gist:7ba2500591b84eb5641df9f8a90dd4c2
Created May 30, 2020 00:33 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.


Updated Apr 5 2019:

because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.

some other notes: