Skip to content

Instantly share code, notes, and snippets.

View cybniv's full-sized avatar
📚
reading

Marvin Schlegel cybniv

📚
reading
View GitHub Profile
@cybniv
cybniv / soundcloud_login.py
Created January 12, 2021 19:51 — forked from blackjack4494/soundcloud_login.py
Soundcloud login. retrieve access_token through reverse engineered web flow authentication.
import time
import random
import requests
import sys
import getpass
import random
# signature generation
def signp(a, i, s, w, u, l, b, k, c, n, r, e, t):
d = '-'.join([str(mInt) for mInt in [a, i, s, w, u, l, b, k]])
@cybniv
cybniv / to_unix_eol.sh
Created September 3, 2020 23:47 — forked from marcelog/to_unix_eol.sh
Translating line endings from mac and dos to unix
#!/bin/bash
cat file.txt | tr '\r' '\n' | tr -s '\n' > file.translated.txt
@cybniv
cybniv / cloudflaredns.sh
Created June 24, 2020 21:56 — forked from m-wild/cloudflaredns.sh
CloudFlare dynamic dns updater module for Synology
#!/bin/sh
# cloudflareddns.sh - dynamic dns updater module for Synology
#
# Author:
# Michael Wildman (http://mwild.me)
#
# Version:
# 0.2
#
@cybniv
cybniv / wl-clipboard.el
Created November 12, 2019 14:18 — forked from yorickvP/wl-clipboard.el
teach emacs to use wl-copy
(setq wl-copy-process nil)
(defun wl-copy (text)
(setq wl-copy-process (make-process :name "wl-copy"
:buffer nil
:command '("wl-copy" "-f" "-n")
:connection-type 'pipe))
(process-send-string wl-copy-process text)
(process-send-eof wl-copy-process))
(defun wl-paste ()
(if (and wl-copy-process (process-live-p wl-copy-process))
@cybniv
cybniv / update.sh
Created September 1, 2019 09:06 — forked from jeremy-wolfe/update.sh
ProtonMail Bridge Updater for Arch Linux
#!/bin/bash
# Should work with your favorite hash algorithm (md5sum, sha256sum, etc.)
hash=md5sum
old="$($hash PKGBUILD)"
wget -O PKGBUILD https://protonmail.com/download/beta/PKGBUILD
new="$($hash PKGBUILD)"
[ "$old" = "$new" ] && echo "Up to date." || makepkg -si
@cybniv
cybniv / mozlz4a.py
Created August 3, 2019 08:53 — forked from kaefer3000/mozlz4a.py
MozLz4a compression/decompression utility
#!/usr/bin/env python
#
# Decompressor/compressor for files in Mozilla's "mozLz4" format. Firefox uses this file format to
# compress e. g. bookmark backups (*.jsonlz4).
#
# This file format is in fact just plain LZ4 data with a custom header (magic number [8 bytes] and
# uncompressed file size [4 bytes, little endian]).
#
# This Python 3 script requires the LZ4 bindings for Python, see: https://pypi.python.org/pypi/lz4
#
@cybniv
cybniv / popcorntime-vpn.sh
Created October 21, 2018 20:37 — forked from Schnouki/popcorntime-vpn.sh
OpenVPN for a single application using network namespaces -- helper scripts
#!/usr/bin/env zsh
# Initialize VPN
sudo vpnns up
sudo vpnns start_vpn
# Popcorn time!
sudo ip netns exec frootvpn sudo -u $USER popcorntime
# Cleanup