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
sreeragh-ar / python_quick_tips.ipynb
Created June 23, 2021 14:07
Python_quick_tips.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tiagovla
tiagovla / grammarly_playonlinux.sh
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
anichitiandreea / typescript_coding_standards.md
Last active April 7, 2024 22:17
TypeScript Code Conventions
@lizettepreiss
lizettepreiss / FDFParser.py
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
dteoh / .gitconfig
Created March 17, 2019 23:40
Use Neovim as git mergetool
[merge]
tool = vimdiff
[mergetool]
keepBackup = false
[mergetool "vimdiff"]
cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
@johand
johand / upgrading_pg.md
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
ilbunilcho / How to remove Windows paths from WSL path.md
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

[interop]
appendWindowsPath = false
@maple3142
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.." >")
break
end
end
return false
@francoism90
francoism90 / retrieve.py
Last active April 12, 2024 21:16
libtorrent - get seeds/peers + metadata without downloading (DHT/magnet)
#!/usr/bin/env python3
import libtorrent as lt
import time
import json
import os
def write_json(path, contents):
with open(path, 'w', encoding='utf-8') as f:
json.dump(contents, f, default=str, indent=4, sort_keys=True)