Skip to content

Instantly share code, notes, and snippets.

View luisnquin's full-sized avatar

Luis Quiñones luisnquin

View GitHub Profile

Setting up qemu VM using nix flakes

Did you know that it is rather easy to setup a VM to test your NixOs configuration?

Create simple flake:

# flake.nix
{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
@luisnquin
luisnquin / JetBrains-Mono.css
Created September 2, 2024 02:16 — forked from Albert221/JetBrains-Mono.css
CSS for using JetBrains Mono on the Web. Simply copy&paste it to your stylesheet.
@font-face {
font-family: 'JetBrains Mono';
src: url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff2/JetBrainsMono-Bold-Italic.woff2') format('woff2'),
url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff/JetBrainsMono-Bold-Italic.woff') format('woff');
font-weight: 700;
font-style: italic;
font-display: swap;
}
@font-face {
@luisnquin
luisnquin / CountryCodes.json
Created July 23, 2024 19:27 — forked from anubhavshrimal/CountryCodes.json
Country and Dial or Phone codes in JSON format
[
{
"name": "Afghanistan",
"dial_code": "+93",
"code": "AF"
},
{
"name": "Aland Islands",
"dial_code": "+358",
"code": "AX"
@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