Skip to content

Instantly share code, notes, and snippets.

@luisnquin
luisnquin / i3-shortcuts-screenshot.md
Created August 30, 2023 18:38 — forked from dianjuar/i3-shortcuts-screenshot.md
My i3 shortcuts to take screenshots

Requirements

  • maim
  • xclip

Set-up

Set this on your i3 config file ~/.i3/config

# Screenshots
@luisnquin
luisnquin / sustainPlusPlus.java
Created August 12, 2023 01:14 — forked from MikuroXina/sustainPlusPlus.java
Mili - sustain++; / Ghost In The Shell: SAC_2045 Ending Theme
package extraLarge;
/**
* The goal of this program is to obtain a HEALTHY
* and SUSTAINABLE relationship, darling.
*
* @author Cassie Wei from Mili
*/
public class sustainPlusPlus {
public static void main(String[] args) {
@luisnquin
luisnquin / mic-toggle-notify.bash
Created April 7, 2023 04:27
Little script to mute/unmute global microphone using amixer and notify-send
microphone_state=''
if [[ $(output=$(amixer set Capture toggle); echo "$output" | grep -m 1 --fixed-strings --only-matching '[on]') ]]; then
microphone_state=unmuted;
else
microphone_state=muted; fi
notify-send "Global microphone state: $microphone_state" "Triggered by keybinding (Ctrl + Alt + M)" --app-name=System --expire-time=2500 --urgency=normal
@luisnquin
luisnquin / scrapping.zsh
Created January 4, 2023 12:40
Bash script to get the current billboard of cinerama in your city
# You can extract your own 'city' value from 'http://www.cinerama.com.pe/cines'
curl --silent http://www.cinerama.com.pe/cartelera_cine/{city} | htmlq --text .row .container .card .card-header | sed 's/.*/\L&/; s/[a-z]*/\u&/g'
@luisnquin
luisnquin / script.bash
Created November 26, 2022 06:45
Bash script that runs swagger-editor in docker and waits for signal SIGINT to kill and remove containers
main() {
docker_command="docker run -d -p 80:8080 "
if [[ $1 != "" ]]; then
absolute_path=$(realpath "$1")
dir=$(dirname "$absolute_path")
docker_command+="-v $dir:/tmp -e SWAGGER_FILE=/tmp/$1 "
fi
@luisnquin
luisnquin / INSTRUCTIONS.md
Created April 10, 2022 19:20
Create battery limit on ASUS
  • Name as battery-charge-threshold.service and move to /etc/systemd/system

  • CHARGE_STOP_THRESHOLD -> Battery limit [0-100]

  • BATTERY_NAME -> Obtained from $ ls /sys/class/power_supply. Example: BAT0, BAT1 and BATT.

Then, run:

$ sudo systemctl enable battery-charge-threshold.service
@luisnquin
luisnquin / 0-go-os-arch.md
Created March 12, 2022 02:16 — forked from asukakenji/0-go-os-arch.md
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
arangorestore --input-directory ./SG_QA --server.endpoint tcp://localhost:8529 --server.database SG_UAT_BKP --create-database true
sudo apt-get install --reinstall libpq-dev
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=FILEID" -O FILENAME && rm -rf /tmp/cookies.txt