Skip to content

Instantly share code, notes, and snippets.

@Treeki
Treeki / TurnipPrices.cpp
Last active July 8, 2024 02:08
AC:NH turnip price calculator
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from https://github.com/simontime/Resead
namespace sead
{
class Random
{
@bobpoekert
bobpoekert / t.js
Last active March 27, 2020 03:41
t.js
setInterval(function() { var s = document.querySelectorAll('path[d="M20.75 2H3.25C2.007 2 1 3.007 1 4.25v15.5C1 20.993 2.007 22 3.25 22h17.5c1.243 0 2.25-1.007 2.25-2.25V4.25C23 3.007 21.993 2 20.75 2zM17.5 13.504c0 .483-.392.875-.875.875s-.875-.393-.875-.876V9.967l-7.547 7.546c-.17.17-.395.256-.62.256s-.447-.086-.618-.257c-.342-.342-.342-.896 0-1.237l7.547-7.547h-3.54c-.482 0-.874-.393-.874-.876s.392-.875.875-.875h5.65c.483 0 .875.39.875.874v5.65z"]'); for (var i=0; i < s.length; i++) { var e = s[i].parentElement.parentElement.parentElement.parentElement.parentElement.parentElement; e.parentElement.removeChild(e); }}, 200);
@Toyz
Toyz / OW1 CMD
Last active July 10, 2024 12:29
All command line options to Overwatch
----------POSSIBLE OPTIONS----------------------------------------------
--account : [optional] account name to login with
--key : [optional] connection key for the server (defaults to 1 in debug)
--automationRoutine : [optional] automation routine to run after login
--startAutomationGraph : [optional] start up and execute automation global graph using provided guid
--gatherEffectStats : [optional] enables effect stat gathering
--noautoconnect : [optional] Do not automatically connect to a server
--fastQuit
--dumpAssetNames : Write to <file> a JSON map of GUID (String "0xabc...") to asset name for all soft assets
--startPosition : [optional] start position when joining a map
@synth
synth / gist:d1045e129a5f35d87b69
Last active May 25, 2021 19:44
High quality gifs on OSX with ffmpeg
brew install ffmpeg ImageMagic mplayer gifsicle
# Option 1
# http://superuser.com/questions/556029/how-do-i-convert-a-video-to-gif-using-ffmpeg-with-reasonable-quality
ffmpeg -y -i yourmovie.mov -vf fps=10,scale=800:-1:flags=lanczos,palettegen palette.png
ffmpeg -i yourmovie.mov -i palette.png -filter_complex "fps=10,scale=800:-1:flags=lanczos[x];[x][1:v]paletteuse" yourgif.gif
# Option 2
# https://gist.github.com/dergachev/4627207
ffmpeg -i in.mov -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > out.gif