Skip to content

Instantly share code, notes, and snippets.

View tsjk's full-sized avatar

Tamas Jantvik tsjk

View GitHub Profile
@nikescar
nikescar / extroot.sh
Last active February 26, 2024 16:45
openwrt extroot
#!/bin/sh
# openwrt extroot /dev/sda1 ext4 /dev/sda2 swap
# latest version https://downloads.openwrt.org/releases/19.07-SNAPSHOT/targets/ar71xx/generic/
opkg update
opkg install kmod-usb-storage kmod-scsi-core block-mount kmod-fs-ext4 kmod-usb-uhci e2fsprogs fdisk
echo "
sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1
@masklinn
masklinn / cheatsheet.md
Last active June 18, 2024 17:54
launchctl/launchd cheat sheet

I've never had great understanding of launchctl but the deprecation of the old commands with launchctl 2 (10.10) has been terrible as all resources only cover the old commands, and documentation for Apple utilities is generally disgracefully bad, with launchctl not dissembling.

Mad props to https://babodee.wordpress.com/2016/04/09/launchctl-2-0-syntax/ which contains most details

domains

Internally, launchd has several domains, but launchctl 1 would only ask for service names,

@JonnyWong16
JonnyWong16 / update_plex_movie_ratings.py
Last active December 17, 2022 17:32
Update Plex movie ratings from IMDB or Rotten Tomatoes
# -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
#
# Plex movie ratings script by /u/SwiftPanda16
#
# *** Use at your own risk! ***
# *** I am not responsible for damages to your Plex server or libraries. ***
#
#------------------------------------------------------------------------------
@v4lli
v4lli / fish.cpp
Created October 10, 2017 08:28
ZNC Fish Module with OpenSSL 1.1 patches (10/10/2017)
#include "znc/main.h"
#include "znc/User.h"
#include "znc/Nick.h"
#include "znc/Modules.h"
#include "znc/Chan.h"
#include "znc/IRCNetwork.h"
#include <string.h>
using std::pair;
using std::map;
@dbro
dbro / csvcut
Last active July 25, 2022 18:04 — forked from JoeGermuska/csvcut
Command line 'cut' utility that can handle csv quoting. This allows proper handling of fields that contain delimiters, both field and record delimiters like commas and newlines. Thanks to github.com/JoeGermuska for the initial version of the code.
#!/usr/bin/env python
"""
from https://gist.github.com/JoeGermuska/561347
Like cut, but for CSVs. To be used from a shell command line.
Note that fields are 1-based, similar to the UNIX 'cut' command.
Should use something better than getopt, but this works...
Usage: