Skip to content

Instantly share code, notes, and snippets.

View xanderificnl's full-sized avatar
💭
Rest In Piece Xander 13-09-2023

Xander xanderificnl

💭
Rest In Piece Xander 13-09-2023
View GitHub Profile
@mihai-dinculescu
mihai-dinculescu / 01-build.rs
Last active May 28, 2023 12:56
ESP32-MQTT-Rust
// build.rs
use embuild::build::LinkArgs;
fn main() -> anyhow::Result<()> {
// Necessary because of this issue: https://github.com/rust-lang/cargo/issues/9641
LinkArgs::output_propagated("ESP_IDF")?;
Ok(())
}
@nevesnunes
nevesnunes / set-tmux-title.sh
Created July 6, 2020 12:55 — forked from florianbeer/set-tmux-title
Set tmux pane title to short hostname on ssh connections
ssh() {
# grep -w: match command names such as "tmux-2.1" or "tmux: server"
if ps -p $$ -o ppid= \
| xargs -i ps -p {} -o comm= \
| grep -qw tmux; then
# Note: Options without parameter were hardcoded,
# in order to distinguish an option's parameter from the destination.
#
# s/[[:space:]]*\(\( | spaces before options
# \(-[46AaCfGgKkMNnqsTtVvXxYy]\)\| | option without parameter

Guix on WSL2

(updated versions of this document, plus more, live here)

This will show you how to get Guix running on WSL2.
We're going to go as "minimal" as possible, without starting off one of the readily available WSL2 distros.
Parts of this guide should help with understanding how to set up any custom distro on WSL, not just Guix.

Disclaimer: I'm a Guix nOOb! (hence going through the trouble of installing it on WSL2)

@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active July 17, 2024 16:29
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface list member
add interface=ether1 list=WAN
/ip firewall address-list
add address=192.168.0.0/16 list=Bogon
add address=10.0.0.0/8 list=Bogon
@mcfrojd
mcfrojd / Shield_Intents.MD
Last active July 27, 2024 13:39
Working INTENTS to use with Community Hass.io Add-ons: Android Debug Bridge for your Nvidia Shield TV

Latest Update 2021-03-06 : New image showing the new "Services" in Home Assistant and got some tips from the comments below.

Credits and thanks: Home Assistant Forum users & Github users: @ocso, @wiphye, @teachingbirds, @tboyce1, @simbesh, @JeffLIrion @ff12 @rebmemer @siaox @DiederikvandenB @Thebuz @clapbr @Finsterclown


Start apps on your android device (in the examples below, my Nvidia Shield TV) from Home Assistant

alt text

Starts Youtube App

entity_id: media_player.shield
command: >-
@lpar
lpar / ssh-agent.fish
Created November 14, 2017 19:05
Fish shell script to run ssh-agent correctly, i.e. only start a new one when necessary
#!/usr/bin/fish
#
# Fish script to run ssh-agent correctly, i.e. only start a new one when
# necessary. Drop it into ~/.config/fish/conf.d and forget about it.
#
# Uses ps and kill, everything else is done inside fish.
#
# Requires fish 2.3 for the string manipulation.
#
# Works with Fedora 26 and CentOS 7, for CentOS 6 you'll need a third party
@jeffochoa
jeffochoa / Response.php
Last active May 22, 2024 04:06
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
@beeman
beeman / remove-all-from-docker.sh
Created November 15, 2016 03:04
Remove all from Docker
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes
@michenriksen
michenriksen / subdomains.lst
Last active December 25, 2023 12:54
Subdomain list for bruteforcing
0
01
02
03
0_
1
10
100
101
102