Skip to content

Instantly share code, notes, and snippets.

@fabiospampinato
fabiospampinato / inspect.zsh
Last active April 20, 2024 09:38
Node.js inspect function and plugin for zsh
# INSPECT
function inspect () {
eval NODE_OPTIONS="--inspect-brk" $@
}
# INSPECT PLUGIN
# Toggles the "inspect " prefix upon double ESC key
function plugin-inspect () {
@y-polek
y-polek / doze_mode_adb_commands.sh
Last active April 20, 2024 09:36
adb commands to test Doze mode
#! /bin/zsh
# Buttery powered state
adb shell dumpsys battery | grep powered
# Unplug battery
adb shell dumpsys battery unplug
# Reset battery
adb shell dumpsys battery reset

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
@hbredin
hbredin / sinc_conv.py
Last active April 20, 2024 09:36
Implementation of SincConv layer in pytorch
#!/usr/bin/env python
# encoding: utf-8
# The MIT License (MIT)
# Copyright (c) 2018 CNRS
# 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
vSphere 6 Enterprise Plus:
1C20K-4Z214-H84U1-T92EP-92838
1A2JU-DEH12-48460-CT956-AC84D
MC28R-4L006-484D1-VV8NK-C7R58
5C6TK-4C39J-48E00-PH0XH-828Q4
4A4X0-69HE3-M8548-6L1QK-1Y240
vSphere with Operations Management 6 Enterprise:
4Y2NU-4Z301-085C8-M18EP-2K8M8
1Y48R-0EJEK-084R0-GK9XM-23R52
@baaldfg
baaldfg / ambilight.ino
Last active April 20, 2024 09:30 — forked from jamesabruce/ambilight.ino
Modified Adalight protocol implementation that uses FastLED library for driving 3-wire LED strips (WS2811, WS2812B) or 4-wire LED strips (e.g WS2801) with parallel output (up to 8 substrips)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
//DESCRIPTION
// Modified Adalight protocol implementation that uses FastLED library (http://fastled.io)
// for driving 3-wire LED (WS2811, WS2812b, WS2813, Neopixel, ...) and 4-wire LED (e.g WS2801) strips.
// It uses FastLEDs parallel output feature to drive the LED stgrips which are arranged in upt to 8 substrips.
// It has been tested in the following arangement with Prismatik (V5.x only) and AmbiBox (http://www.ambibox.ru/en/index.php/Main_Page).
// With Abmbibox (V2.1.7) it seems to work better as the CPU load with Prismatik is quite high. On a fast machine, this will be probably not an issue.
// The official Ambibox download link seems to be dead. Version 2.1.7 can be found here: https://github.com/AmbiBox/kodi.script.ambibox/releases
// The file triggers a virus/malware warning. For me it seems like a false positive. Only install The main program as the rest
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active April 20, 2024 09:27
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@rveitch
rveitch / sass-7-1-pattern.scss
Last active April 20, 2024 09:26
Sass 7-1 Pattern
sass/
|
|– base/
| |– _reset.scss # Reset/normalize
| |– _typography.scss # Typography rules
| ... # Etc…
|
|– components/
| |– _buttons.scss # Buttons
| |– _carousel.scss # Carousel