Skip to content

Instantly share code, notes, and snippets.

View subiabre's full-sized avatar

Daniel Subiabre García subiabre

View GitHub Profile
# 1. Ejecutar en PowerShell (como administrador)
```
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
dism.exe /online /enable-feature /featurename:Microsoft-Hyper-V /all /norestart
wsl --install
wsl --set-default-version 2
```
@subiabre
subiabre / flactomp3
Created July 8, 2022 20:16
Convert all flac files in a directory to high quality mp3
for f in *.flac; do ffmpeg -i "$f" -ab 320k -map_metadata 0 -id3v2_version 3 "${f%.flac}.mp3"; done
@subiabre
subiabre / profile.dconf
Created June 12, 2022 16:43
gnome-terminal profile
[:b1dcc9dd-5262-4d8d-a863-c897e6d979b9]
background-color='rgb(0,43,54)'
background-transparency-percent=7
default-size-columns=150
default-size-rows=30
font='Monospace 10'
foreground-color='rgb(131,148,150)'
use-system-font=false
use-theme-colors=false
use-theme-transparency=false
@subiabre
subiabre / fnkeyswitch
Created October 27, 2021 15:19
This bash script toggles the FN key in my keyboard between Ubuntu media keys and function keys
#!/bin/bash
fnmode="/sys/module/hid_apple/parameters/fnmode"
value=$(cat "$fnmode")
switch=1
if test "$value" -eq 0 ; then
switch=1
else
switch=0
fi
@subiabre
subiabre / image-resizer.sh
Last active June 16, 2022 20:15
Resizes all the images in a folder
#!/bin/bash
for i in *; do convert $i -resize 1024x ./1024/$i.jpg; done;
@subiabre
subiabre / bulk-update-forests-war.sh
Last active June 16, 2022 20:14
Bulk updater to catch up forests war downtime
#!/bin/bash
# I used this sh script to auto update the delay days variable for http://github.com/subiabre/forestswar
DELAY_DAYS=$(grep DELAY_DAYS .env | xargs)
days=${DELAY_DAYS#*=}
while [ $days -ge 8 ]
do
echo "$days"