Skip to content

Instantly share code, notes, and snippets.

View vansoest's full-sized avatar

Sophie van Soest vansoest

View GitHub Profile
@roalcantara
roalcantara / 0_tldr.zsh
Last active December 9, 2023 00:30
Glob (globbing)
## TL;DR
setopt extendedglob
ls *(<tab> # to get help regarding globbing
rm ../debianpackage(.) # remove files only
ls -d *(/) # list directories only
ls /etc/*(@) # list symlinks only
ls -l *.(png|jpg|gif) # list pictures only
ls *(*) # list executables only
ls /etc/**/zsh # which directories contain 'zsh'?
@blakadder
blakadder / diffuserinha.yaml
Created May 6, 2019 08:58
Home Assistant configuration for the Oil Diffuser 550ML
fan:
- platform: mqtt
name: "Diffuser"
availability_topic: "tele/diffuser/LWT"
payload_available: "Online"
payload_not_available: "Offline"
state_topic: "stat/diffuser/POWER1"
command_topic: "cmnd/diffuser/POWER1"
speed_state_topic: "stat/diffuser/FAN"
payload_low_speed: low
@cart
cart / FXAA.tscn
Last active January 30, 2024 18:17
Godot Nvidia FXAA 3.11 Port
[gd_scene load_steps=3 format=2]
[sub_resource type="Shader" id=1]
code = "shader_type canvas_item;
// Godot Nvidia FXAA 3.11 Port
// Usage: Drop this in to any 3D scene for FXAA! This is a port of the \"PC High Quality Preset 39\". However the medium quality
// parameters are also included. For medium quality, just comment out sections \"PS 6\" and above and uncomment the \"med 13\" variables.
@WangYihang
WangYihang / port-forwarding.py
Last active April 3, 2024 06:13
port forwarding via python socket
#!/usr/bin/env python3
# Tcp Port Forwarding (Reverse Proxy)
# Author : WangYihang <wangyihanger@gmail.com>
'''
+-----------------------------+ +---------------------------------------------+ +--------------------------------+
| My Laptop (Alice) | | Intermediary Server (Bob) | | Internal Server (Carol) |
+-----------------------------+ +----------------------+----------------------+ +--------------------------------+
| $ ssh -p 1022 carol@1.2.3.4 |<------->| IF 1: 1.2.3.4 | IF 2: 192.168.1.1 |<------->| IF 1: 192.168.1.2 |
| carol@1.2.3.4's password: | +----------------------+----------------------+ +--------------------------------+
@DorianRudolph
DorianRudolph / LICENSE.txt
Last active January 4, 2024 03:36
Arduino PS2 to USB HID Keyboard Converter
Copyright (c) 2015, Dorian Rudolph
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:
The above copyright notice and this permission notice shall be included in all
@mildred
mildred / README.md
Last active February 23, 2017 11:58
Listen to Pulseaudio RTP stream using gstreamer

This ought to be in the wiki

The command line is :

gst-launch-1.0 udpsrc address=224.0.0.56 port=46194 caps="application/x-rtp, media=audio, payload=10, clock-rate=44100" ! .recv_rtp_sink_0 rtpbin ! rtpL16depay ! audioconvert ! audioresample ! alsasink device=hw:0,0

gst-launch-1.0 udpsrc address=224.0.0.56 port=45678 caps="application/x-rtp, media=audio, payload=10, clock-rate=44100" ! .recv_rtp_sink_0 rtpbin ! rtpL16depay ! audioconvert ! audioresample ! alsasink device=hw:1,0

Of course, you adjust the sink how you want and update the port number according to the method given on the above page of the wiki (tcpdump -n net 224.0.0.0/8 -c 10).

@arulrajnet
arulrajnet / ChromeAppDownloader.py
Last active February 15, 2024 01:06
Python Script to download the Chrome Extensions (CRX) file directly from the google chrome web store.
# -*- coding: utf-8 -*-
"""
Python Script to download the Chrome Extensions (CRX) file directly from the google chrome web store.
Referred from http://chrome-extension-downloader.com/how-does-it-work.php
"""
from __future__ import division
import argparse
import requests
@niw
niw / Molokai.icls
Last active November 19, 2019 18:56
Molokai color scheme for IntelliJ IDEA. Put this file into ~/Library/Preferences/<Path to each IntelliJ Platforms>/colors.
<scheme name="Molokai" version="142" parent_scheme="Default">
<option name="LINE_SPACING" value="1.0" />
<option name="EDITOR_FONT_SIZE" value="14" />
<option name="EDITOR_FONT_NAME" value="Menlo" />
<colors>
<option name="ADDED_LINES_COLOR" value="a6e22e" />
<option name="ANNOTATIONS_COLOR" value="66d9ef" />
<option name="ANNOTATIONS_MERGED_COLOR" value="a6e22e" />
<option name="CARET_COLOR" value="f8f8f2" />
<option name="CARET_ROW_COLOR" value="232526" />
@Thermionix
Thermionix / auth-basic.conf
Last active November 4, 2021 00:56
nginx reverse proxy for sickbeard, couchpotato etc.
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/htpasswd;