Skip to content

Instantly share code, notes, and snippets.

View soarn's full-sized avatar
🇺🇸
Attempting something.

Jack soarn

🇺🇸
Attempting something.
View GitHub Profile
@shawnli87
shawnli87 / download_gofile.sh
Last active April 9, 2024 10:03 — forked from MCOfficer/README.md
Bash script to download files from gofile.io
#!/bin/bash
url="$1"
#prompt for url if not provided
until [ ! -z "$url" ] ; do
read -p "url=" url
done
id=$(sed 's|.*gofile.io/d/||g' <<< "$url")
version: "3"
services:
sftpgo:
image: "drakkan/sftpgo:v2-alpine"
# default user id
user: 1026
restart: always
expose:
# HTTP
- "8080"
@rithvikvibhu
rithvikvibhu / LICENSE
Last active July 22, 2024 12:04
Get tokens for Google Home Foyer API
MIT License
Copyright (c) 2020 Rithvik Vibhu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@NISH1001
NISH1001 / ffmpeg-audio-gif.sh
Last active March 6, 2024 18:44
merge audio with a looped GIF using ffmpeg
#!/bin/bash
echo "i am paradox"
#ffmpeg -i audio.mp3 -ignore_loop 0 -i test.gif -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -shortest -strict -2 -c:v libx264 -threads 5 -c:a aac -b:a 192k -pix_fmt yuv420p -shortest final.mp4
# ffmpeg -i audio.mp3 -ignore_loop 0 -i test.gif -shortest -strict -2 -c:v libx264 -threads 5 -c:a aac -b:a 192k -pix_fmt yuv420p -shortest final.mp4
# ffmpeg -i audio.mp3 -ignore_loop 0 -i test.gif -vf "scale=trunc(iw/2)*1:trunc(ih/2)*2" -shortest -strict -2 -c:v libx264 -threads 5 -c:a aac -b:a 192k -pix_fmt yuv420p -shortest final.mp4
@shelune
shelune / Houkai3rd guide for casual f2p players.md
Last active October 28, 2023 23:25
Houkai3rd guide for casual f2p players

Guide for F2P(ish) casual(ish) players

Introduction

Hi! I started Houkai 3rd during the 1st or 2nd week of its Global release. Houkai 3rd is one of the better mobile games out there that feature weekly content update, smooth gameplay, nice graphics (waifu fo laifu!) and doesn't require heavy grinding. Overall, very F2P-friendly (I'm coming from Pokemon Shuffle so I have a pretty high standard for a F2P game).

To explain the title, I'm not 100% F2P (hence, F2P-ish) since I subscribe to the 60-crystal-daily package. That amount is nothing compared to the whales and doesn't really help you much with the gacha way of this game, so it's mostly to support MiHoYo for such a good game. It's completely feasible you progress in this game decently without spending any money. Casual-ish is because I spend about 2 hours per day for this game (3 in the weekend). I think that's more than a lot of other mobile games which you can just pop out on the bus / train. However, I believe the more time you invest in the

@Erk-
Erk- / guide.md
Last active September 16, 2023 23:23
Play directly from spotify (or other mopidy sources)

Play directly from spotify

Intro

This guide helps you setup a configuration like: mopidy -> icecast -> listner (bot) Where you can use mopidy to play from a wide selection of sources for example Spotify. At the moment I know of no Discord bots capable of controlling an mpd/mopidy server so the adding of playlists have to go through a webinterface or similar. In this guide I will focus on setting up Spotify. The full config files will also be in the gist.

Mopidy

Installation

@mcastelino
mcastelino / iptables-cheatsheet.md
Last active July 10, 2024 08:51
iptables-cheatsheet

The netfilter hooks in the kernel and where they hook in the packet flow

The figure below calls out

  • The netfilter hooks
  • The order of table traversal
@dcode
dcode / GitHub Flavored Asciidoc (GFA).adoc
Last active June 23, 2024 21:12
Demo of some useful tips for using Asciidoc on GitHub

GitHub Flavored Asciidoc (GFA)

@jamesmacwhite
jamesmacwhite / ffmpeg_mkv_mp4_conversion.md
Last active July 9, 2024 09:52
Easy way to convert MKV to MP4 with ffmpeg

Converting mkv to mp4 with ffmpeg

Essentially just copy the existing video and audio stream as is into a new container, no funny business!

The easiest way to "convert" MKV to MP4, is to copy the existing video and audio streams and place them into a new container. This avoids any encoding task and hence no quality will be lost, it is also a fairly quick process and requires very little CPU power. The main factor is disk read/write speed.

With ffmpeg this can be achieved with -c copy. Older examples may use -vcodec copy -acodec copy which does the same thing.

These examples assume ffmpeg is in your PATH. If not just substitute with the full path to your ffmpeg binary.

Single file conversion example

@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active July 26, 2024 14:30
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \