Skip to content

Instantly share code, notes, and snippets.

View zodman's full-sized avatar
Code wins arguments!

Andres Vargas zodman

Code wins arguments!
View GitHub Profile
sreeragh-ar / python_quick_tips.ipynb
Created June 23, 2021 14:07
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
tiagovla /
Created April 6, 2021 04:14
Script to install grammarly on linux using PlayOnLinux.
#!/usr/bin/env playonlinux-bash
# Date : (2021-04-05 04-20)
# Last revision : (2021-04-05 06-09)
# Wine version used : 6.3 staging
# Distribution used to test : Ubuntu 20.04 LTS
# Author : tiagovla
# PlayOnLinux : 4.3.4
# Script licence : MIT
[ "$PLAYONLINUX" = "" ] && exit 0
anichitiandreea /
Last active July 12, 2024 23:29
TypeScript Code Conventions
sergeiwaigant /
Last active July 11, 2024 19:17
Simply URL encode string with Linux/Bash/Shell tools


$ printf %s 'encode this'|jq -sRr @uri
$ jq -rn --arg x 'encode this' '$x|@uri'
-r (--raw-output) outputs the raw contents of strings instead of JSON string literals. -n (--null-input) doesn't read input from STDIN.

-R (--raw-input) treats input lines as strings instead of parsing them as JSON, and -sR (--slurp --raw-input) reads the input into a single string. You can replace -sRr with -Rr if your input only contains a single line, or if you don't want to replace linefeeds with %0A:
lizettepreiss /
Last active January 20, 2023 03:59
How to parse a .fdf file in Python. The intention was to export comments I'd made in a .pdf (using Adobe Reader DC's commenting capability) and make them available elsewhere to use as a basis for further notes.
from pdfminer.pdfparser import PDFParser
from pdfminer.pdfdocument import PDFDocument
from pdfminer.pdftypes import resolve1
# I exported the comments I had made in an Adobe Reader DC document to f:temp/stn.fdf.
# Now I wanted to access those comments outside of the Adobe Reader. Here is how I extracted the comments.
fdf_file = open("F:/temp/stn.fdf", 'rb')
dteoh / .gitconfig
Created March 17, 2019 23:40
Use Neovim as git mergetool
tool = vimdiff
keepBackup = false
[mergetool "vimdiff"]
cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
johand /
Last active January 23, 2024 02:12
Upgrading PostgreSQL to a major version in Archlinux

Upgrading PostgreSQL to a major version in Archlinux

# pacman -S postgresql-old-upgrade

# systemctl stop postgresql.service
# mv /var/lib/postgres/data /var/lib/postgres/olddata
ilbunilcho / How to remove Windows paths from WSL
Created November 1, 2018 16:41
How to remove Windows paths from WSL path

after Build 17093

  • can override settings by edit "/etc/wsl.conf"
  • normally this file is not exists at first
$ sudo vi /etc/wsl.conf

appendWindowsPath = false
maple3142 / show_git_branch.lua
Last active September 26, 2021 14:14
clink show git branch
function show_git_branch()
for line in io.popen("git branch 2>nul"):lines() do
local m = line:match("%* (.+)$")
local b = "\x1b[32;22;49m".."("..m..")".."\x1b[39;22;49m"
if m then
clink.prompt.value = clink.prompt.value:gsub(">"," "..b.." >")
return false