Skip to content

Instantly share code, notes, and snippets.

View guerrerocarlos's full-sized avatar
:octocat:
On shoulders of giants.

Carlos Guerrero guerrerocarlos

:octocat:
On shoulders of giants.
View GitHub Profile
@guerrerocarlos
guerrerocarlos / calibrate_elo_touch_linux.sh
Created April 30, 2016 02:45
Script for calibrating Elo Touchscreen in Ubuntu Linux
# https://wiki.ubuntu.com/Touchscreen
sudo apt-get install xinput-calibrator
xinput_calibrator --output-type xinput
@guerrerocarlos
guerrerocarlos / ffmpeg_fast.sh
Last active March 29, 2024 10:46
Use Apple Metal M1 M2 acceleration with ffmpeg
ffmpeg -i PXL4.mp4 -c:v h264_videotoolbox -q:v 65 -c:a copy output_q65.mp4
@guerrerocarlos
guerrerocarlos / html_copy_button
Created August 2, 2012 17:42
clippy html object
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
width="110"
height="14"
id="clippy" >
<param name="movie" value="/flash/clippy.swf"/>
<param name="allowScriptAccess" value="always" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param NAME="FlashVars" value="text=#{text}">
<param name="bgcolor" value="#{bgcolor}">
@guerrerocarlos
guerrerocarlos / New_Macbook_setup.md
Last active February 26, 2024 17:01
Mac Setup Guide

Install Prezto

  1. Launch Zsh:

    zsh
  2. Clone the repository:

@guerrerocarlos
guerrerocarlos / RaspSyncthing.md
Last active February 14, 2024 20:47
How to setup Syncthing in a Raspberry Pi

Install syncthing:

sudo mkdir -p /etc/apt/keyrings
sudo curl -L -o /etc/apt/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg
echo "deb [signed-by=/etc/apt/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
sudo apt-get update
sudo apt-get install syncthing
printf "Package: *\nPin: origin apt.syncthing.net\nPin-Priority: 990\n" | sudo tee /etc/apt/preferences.d/syncthing.pref
sudo apt-get install apt-transport-https
@guerrerocarlos
guerrerocarlos / RasPiCloudflareDNS.md
Last active February 11, 2024 11:12
How to setup DDclient on Raspberry Pi for use with Namecheap DynDNS
@guerrerocarlos
guerrerocarlos / plex_media_permissions_4_noobies.md
Created February 10, 2024 19:50 — forked from pjobson/plex_media_permissions_4_noobies.md
Plex Media Permissions for Linux Noobies

Plex Media Permissions for Linux Noobies

There is no problem with being a noobie and I do not use the term to sligtht or disparage anyone.

This is a way to setup your permissions for running Plex in Linux. Different folks may use different methods.

The permissions concepts provided here apply to OSX, but the users and groups are controlled and modified differently, so much of this will not work properly. I think the command is dscl, but that could be out of date.

There are many ways to setup your permissions scheme in Linux, this methodology describes a way to do it, not everyone will like it, but it works for me, so whatever.

@guerrerocarlos
guerrerocarlos / rotate-video.sh
Created September 22, 2023 09:10 — forked from ViktorNova/rotate-video.sh
Rotate a video with FFmpeg (100% lossless, and quick)
$INPUTVIDEO='input.mp4'
$OUTPUTVIDEO='output.mp4'
ffmpeg -i $INPUTVIDEO -metadata:s:v rotate="-90" -codec copy $OUTPUTVIDEO
@guerrerocarlos
guerrerocarlos / check_if_gmail_exists.sh
Last active January 8, 2024 00:46
Example telnet to check if a GMAIL email exists
telnet gmail-smtp-in.l.google.com 25
Connected to gmail-smtp-in.l.google.com.
220 mx.google.com ESMTP t2si1556751otm.271 - gsmtp
HELO gmail.com
250 mx.google.com at your service
mail from:<cguerrero@masterworks.io>
250 2.1.0 OK t2si1556751otm.271 - gsmtp
rcpt to:<thisemaildoesnotexist232131@gmail.com>
550-5.1.1 The email account that you tried to reach does not exist. Please try
550-5.1.1 double-checking the recipient's email address for typos or
@guerrerocarlos
guerrerocarlos / python_miner.py
Created May 19, 2018 18:54
Stratum Python Miner Example
#A stratum compatible miniminer
#based in the documentation
#https://slushpool.com/help/#!/manual/stratum-protocol
#2017 Martin Nadal for the Bittercoin project
import socket
import json
import hashlib
import binascii
from pprint import pprint