Skip to content

Instantly share code, notes, and snippets.

@islands04
islands04 / vimeo-downloader.js
Created June 10, 2021 04:22 — forked from mistic100/vimeo-downloader.js
Download video from Vimeo (chopped m4s files)
// 1. Open the browser developper console on the network tab
// 2. Start the video
// 3. In the dev tab, locate the load of the "master.json" file, copy its full URL
// 4. Run: node vimeo-downloader.js "<URL>"
// 5. Combine the m4v and m4a files with mkvmerge
const fs = require('fs');
const url = require('url');
const https = require('https');
import numpy as np
import padasip as pa
import matplotlib.pylab as plt
# prep data
N = 200 # the overall time series size
n = 5 # size of sample we want to feed into the filter
s = np.random.random(N) # generate the source input
d = np.zeros(N) # initialize the target array
for k in range((n-1), N):
@islands04
islands04 / iptables_rules.sh
Created April 27, 2020 15:09 — forked from virtualstaticvoid/iptables_rules.sh
25 Most Frequently Used Linux IPTables Rules Examples
# Modify this file accordingly for your specific requirement.
# http://www.thegeekstuff.com
# 1. Delete all existing rules
iptables -F
# 2. Set default chain policies
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP
@islands04
islands04 / minecraft-java.service
Created April 22, 2020 16:43
Minecraft Java Edition Server SystemD Unit
[Unit]
Description=Minecraft Java Edition Service
After=network.target
[Service]
Type=Simple
WorkingDirectory=/opt/minecraft/java-server
ExecStart=/usr/bin/java -Xmx2048M -Xms2048M -jar minecraft-1.14.4-server.jar nogui
TimeoutStopSec=20
Restart=on-failure
@islands04
islands04 / .vimrc
Created March 15, 2020 01:43
Vim Deus Colors
set t_Co=256
set termguicolors
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
set background=dark " Setting dark mode
syntax on
colorscheme deus
let g:deus_termcolors=256
@islands04
islands04 / coredns.service
Created March 14, 2020 15:59
Coredns setup
[Unit]
Description=Coredns Service
After=network.target
[Service]
User=root
Group=root
Type=Simple
@islands04
islands04 / calibre-import-cleanup.service
Created March 14, 2020 15:54
Calibre Content Server Systemd Scripts
[Unit]
Description=Clean Up Calibre Import Directory
After=network.target
[Service]
Type=oneshot
User=calibre
Group=calibre
ExecStart=/usr/bin/rm -f /home/calibre/mnt/downloads/books/*.cbz
ExecStart=/usr/bin/rm -f /home/calibre/mnt/downloads/books/*.cbr
@islands04
islands04 / minecraft-systemd-unit
Created March 11, 2020 02:39
Minecraft Systemd Service Unit
[Unit] Description=Minecraft Bedrock Service After=network.target [Service] Type=Simple
@islands04
islands04 / fp-lingo.md
Created March 8, 2020 15:43 — forked from ericelliott/fp-lingo.md
A Guide to Functional Programming Lingo for JavaScripters

A Guide to Functional Programming Lingo for JavaScripters

Functional programming gets a bad wrap about being too hard for mere mortals to comprehend. This is nonsense. The concepts are actually quite simple to grasp.

The jargon is the hardest part. A lot of that vocabulary comes from a specialized field of mathematical study called category theory (with a liberal sprinkling of type theory and abstract algebra). This sounds a lot scarier than it is. You can do this!

All examples using ES6 syntax. wrap (foo) => bar means:

function wrap (foo) {
# See this wiki page for more info:
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
#
#/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:01/power_supply/C1B3
#BATTERY_CAPACITY=$(cat /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:01/power_supply/C1B3/capacity)
#BATTERY_STATUS=$(cat /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:01/power_supply/C1B3/status)
#echo "Battery Capacity = $BATTERY_CAPACITY, Battery Status = $BATTERY_STATUS"
print_info() {