Skip to content

Instantly share code, notes, and snippets.

View rien333's full-sized avatar

Rijnder Wever rien333

View GitHub Profile
@nyrahul
nyrahul / kernel.config
Last active December 12, 2020 17:28
My tailored linux kernel config file for Huawei Matebook X Pro 2018 Model. Enables Wacom tablet support.
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.18.7 Kernel Configuration
#
#
# Compiler: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
#
CONFIG_64BIT=y
CONFIG_X86_64=y
@rien333
rien333 / observer.m
Last active January 22, 2018 23:43
Command-line app that tells a bitbar chunkwm plugin to refresh whenever the user changes spaces
#import <Cocoa/Cocoa.h>
@interface SpaceChangeNotifier : NSObject
- (void) registerNotifier;
- (void)spaceChanged:(NSNotification *)aNotification;
@end
@implementation SpaceChangeNotifier
- (id) init
@yangxuan8282
yangxuan8282 / compile-mpv-mmal-rpi.md
Last active June 3, 2020 14:23
compile mpv with hardware acceleration (mmal) on RPi, no windows borders

mpv

The latest working mpv version for this guides is 0.27.2, tested on 2018-03-13-raspbian-stretch.

sudo apt-get update && sudo apt-get upgrade -y && 
sudo apt-get install -y git devscripts equivs &&
sudo apt-get install -y libgles2-mesa-dev
@j-jith
j-jith / miui-fastboot-howto.rst
Last active May 9, 2024 06:37
How to flash MIUI Fastboot ROM from Linux

How to flash MIUI Fastboot ROM from Linux

@charlietran
charlietran / TerminalVim.scpt
Last active October 14, 2023 06:50
Open file in iTerm vim for MacOS Sierra
-- TerminalVim.app
-- This creates a shim Application that will enable you to open files from the Finder in vim using iTerm
-- To use this script:
-- 1. Open Automator and create a new Application
-- 2. Add the "Run Applescript" action
-- 3. Paste this script into the Run Applescript section
-- 4. Save the application as TerminalVim.app in your Applications folder
-- 5. In the Finder, right click on a file and select "Open With". In that window you can set TerminalVim as a default
@Ruin0x11
Ruin0x11 / mpv-gif.lua
Last active March 26, 2024 01:01
Create animated GIFs using mpv
-- Create animated GIFs with mpv
-- Requires ffmpeg.
-- Adapted from http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
-- Usage: "g" to set start frame, "G" to set end frame, "Ctrl+g" to create.
local msg = require 'mp.msg'
-- Set this to the filters to pass into ffmpeg's -vf option.
-- filters="fps=24,scale=320:-1:flags=lanczos"
filters="fps=15,scale=540:-1:flags=lanczos"
@rberenguel
rberenguel / SafariTabSwitcher.lua
Last active April 1, 2022 15:45
An interactive tab chooser for Safari written with AppleScript (yikes) for HammerSpoon (Lua scripting framework for Mac OS automation)
----
-- A tab chooser for Safari written with AppleScript (yikes) and HammerSpoon
----
----
-- Known issues:
-- If a tab has double quotes, unsure about what will happen, the tab
-- list creation is brittle. Single quote is fixed though
@RichoDemus
RichoDemus / gist:fa8290b924195bd33e60
Created February 24, 2016 07:31
Remove Manjaro bloat
25 pacman -Rsn flashplugin
26 sudo pacman -Rsn flashplugin
29 sudo pacman -Rsn gimp
33 sudo pacman -Rsn libreoffice-still
36 sudo pacman -Rsn viewnior
40 sudo pacman -Rsn pidgin
43 sudo pacman -Rsn firefox-gtk2
48 sudo pacman -Rsn hexchat
51 sudo pacman -Rsn thunderbird
57 sudo pacman -Rsn guayadeque
@tomkrcha
tomkrcha / gist:9009845
Created February 14, 2014 21:36
Detect if Mac OSX space changed in cocoa - NSWorkspaceActiveSpaceDidChangeNotification change / event / notification
@implementation AppDelegate
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
NSNotificationCenter *nc = [[NSWorkspace sharedWorkspace] notificationCenter];
[nc addObserver:self
selector:@selector(spaceChanged:)
name:NSWorkspaceActiveSpaceDidChangeNotification
object:[NSWorkspace sharedWorkspace]];
@willurd
willurd / web-servers.md
Last active May 11, 2024 21:00
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000