Skip to content

Instantly share code, notes, and snippets.

View mageddo's full-sized avatar
💭
🚲 🍺

Elvis Souza mageddo

💭
🚲 🍺
View GitHub Profile
@witmin
witmin / ffmpeg-mp4-to-animated-webp.md
Last active June 12, 2024 13:30
Convert MP4 file to animated WebP in ffmpeg

Convert MP4 file to animated WEBP file in ffmpeg CLI

1. Install ffmpeg CLI through homebrew

In terminal.app, install ffmpeg through homebrew

brew install ffmpeg

Validate the installation:

@Mnkai
Mnkai / README.md
Last active April 13, 2024 14:11
TDP and turbo parameter modification with MSR on non-overclockable Intel CPU (such as Intel i7-8550U)

TDP and turbo parameter modification with MSR on non-overclockable CPU

Disclaimer

  • MSR modification may void your CPU's (or system board's) warranty. Proceed with care. I'm not responsible for any destruction caused by this article.
  • MSR address (greatly) differs from CPU to CPU. Check your own CPU's MSR address using Intel's documentation.
  • Only tested on Intel i7-8550U (Kaby Lake R).
  • This article is translation of this article. If you can understand Korean, I recommend reading that article, not this.

Start

jar xf myfile.jar
@Ghost---Shadow
Ghost---Shadow / PlaylistLength.js
Last active April 6, 2024 09:25
Calculate the total length of a youtube playlist. Just open javascript console, paste and press enter.
/**
USAGE
1. Open the playlist you want
2. Right click > Inspect element > Console
3. Copy this and paste. Hit enter.
4. For watch later make sure to click the Edit button
Make sure &disable_polymer=true flag is set
e.g.
https://www.youtube.com/playlist?list=WL&disable_polymer=true
@fsteffenhagen
fsteffenhagen / sum_filesize.sh
Last active April 15, 2024 10:04
sum human readable file sizes with numfmt and awk
# Input: list of rows with format: "<filesize> filename", e.g.
# filesizes.txt
#######################
# 1000K file1.txt
# 200M file2.txt
# 2G file3.txt
#
# Output:
cat filesizes.txt | numfmt --from=iec | awk 'BEGIN {sum=0} {sum=sum+$1} END {printf "%.0f\n", sum}'
@mlaccetti
mlaccetti / EmbeddedMessageQueueResource.java
Last active February 24, 2021 10:26 — forked from AlejandroRivera/EmbeddedMessageQueueResource.java
Apache QPid as embedded MQ broker
package laccetti.test;
import org.apache.qpid.server.Broker;
import org.apache.qpid.server.BrokerOptions;
import com.google.common.io.Files;
/**
* We shouldn't need external things for testing
*/
@astromechza
astromechza / cpueater.java
Last active January 4, 2023 09:58
Simple java program for running multi-threaded cpu stress test.
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.concurrent.atomic.LongAdder;
public class Main
{
public static void main(String[] args) throws InterruptedException
{
if (args.length != 1)
@schickling
schickling / _README.md
Last active January 4, 2024 09:37
Script to import and export docker-machine configurations to sync between hosts/collaborators

docker-machine import/export

Script to import and export docker-machine configurations to sync between hosts/collaborators

Export (on host A)

$ docker-machine ls
NAME       ACTIVE   DRIVER         STATE     URL                            SWARM   DOCKER    ERRORS
dev        -        digitalocean   Running   tcp://example.com:2376                 v1.10.1
@StevenMaude
StevenMaude / convert_gpx.sh
Last active January 29, 2023 17:29
Use gpsbabel to convert Garmin .FIT to .gpx — requires a fairly recent version of gpsbabel (minimum 1.4.3); see https://www.stevenmaude.co.uk/posts/using-garmin-forerunner-watches-with-linux for more details on using Garmin watches with Linux
#!/bin/sh
# Usage: convert_gpx.sh <FIT filename>
# Should works whether you include the .FIT extension or not.
filename=$(basename "$1" .FIT)
gpsbabel -i garmin_fit -f "$filename".FIT -o gpx -F "$filename".gpx
@maschill92
maschill92 / demos.cfg
Last active December 27, 2022 20:08
A CS:GO config file to make watching demos much easier.
//----------------------------- MISC -------------------------------\\
//------------------------------------------------------------------\\
sv_cheats "1"
sv_showimpacts "0"
sv_showimpacts_time "2.5"
//---------------------------- BINDS -------------------------------\\
//------------------------------------------------------------------\\
bind "SPACE" "demo_togglepause" // pause/play demo
bind "c" "r_cleardecals" // get rid of bulletholes and black residue from grenade explosions