Skip to content

Instantly share code, notes, and snippets.

View eliasrm87's full-sized avatar

Elías Rodríguez Martín eliasrm87

View GitHub Profile
#!/bin/bash
OUTPUT_DIR=""
INPUT_FILE=""
ZOOM=0.7
WIDTH=1080
HEIGHT=1080
ROTATE_X=0
ROTATE_Z=45
ROTATION=360 # Total rotation angle
@juanqui
juanqui / bed.g
Last active August 26, 2021 16:14
CR-10 S4 Duet2Wifi Config w/ BLTouch and AC Heated Bed
M561 ; clear any bed transform
G29 S2 ; Clear bed height map
; Probe 2-points
M401 ; Deploy probe - deployprobe.g
G30 P0 X20 Y200 Z-9999 ; Center Left
G30 P1 X340 Y200 Z-9999 S2 ; Center Right
M402 ; Retract Probe - retractprobe.g
@lightrush
lightrush / README.md
Last active September 2, 2023 22:57
Normalize volume level with PulseAudio

Normalize volume level with PulseAudio and simultaneous output

This should work conceptually on any Linux OS with PulseAudio but these particular instructions are for Ubuntu. There are two major reasons for using simultaneous output. The first is self-evident - we can output to say a bluetooth headset and wired headphones at the same time to enable two people to watch a movie with headphones on a single computer. The second reason is a sort of a convenience for setup. We know the simultaneous sink name so the default.pa config would work without modification so long as simultaneous output is enabled. If we were to set this up without that, we'd have to customize the config with our specific device sink name. That's totally doable but personally I always setup simultaneous output. That's why I haven't described the alternative in this gist.

@htruong
htruong / chroot-to-pi.sh
Last active May 5, 2024 10:59
Chroot to pi sd card
#!/bin/bash
# This script allows you to chroot ("work on")
# the raspbian sd card as if it's the raspberry pi
# on your Ubuntu desktop/laptop
# just much faster and more convenient
# credits: https://gist.github.com/jkullick/9b02c2061fbdf4a6c4e8a78f1312a689
# make sure you have issued
@jcberthon
jcberthon / networkmanager-wifi-powersave.md
Last active April 22, 2024 14:33
NetworkManager Wi-Fi powersaving configuration

NetworkManager WiFi Power Saving

NetworkManager supports WiFi powersaving but the function is rather undocumented.

From the source code: wifi.powersave can have the following value:

  • NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0): use the default value
  • NM_SETTING_WIRELESS_POWERSAVE_IGNORE (1): don't touch existing setting
  • NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2): disable powersave
@hfs
hfs / compress-pdf.sh
Created July 7, 2014 09:32
Compress a PDF file of scanned JPEGs using ImageMagick. Source: http://superuser.com/questions/427851/batch-resize-and-compress-pdf-files
convert -density 200 -compress jpeg -quality 20 input.pdf output.pdf
/* usbreset -- send a USB port reset to a USB device
*
* Compile using: gcc -o usbreset usbreset.c
*
*
* */