Skip to content

Instantly share code, notes, and snippets.

View Manssizz's full-sized avatar

Manssizz

  • Jakarta
View GitHub Profile
@lukehedger
lukehedger / ffmpeg-compress-mp4
Last active July 22, 2024 07:23
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
ffmpeg -i data/video.mp4 -vcodec h264 -b:v 1000k -acodec mp2 data/output.mp4
@AfroThundr3007730
AfroThundr3007730 / 00-repoupdate.md
Last active January 9, 2023 09:44
Configuration files for local yum and apt repositories. (Retired)

Note: This gist is historical now that I've moved this to a proper repo: AfroThundr3007730/syncrepo

Below are configuration files for creating upstream and downstream yum and apt repositories. These can be hosted on a CentOS, Debian, or Ubuntu system and served via rsync or http. The only requirements are rsync and a webserver, such as apache, and also debmirror. Note that not all required setup steps are listed here (TODO: add setup guide).

Filename Description Notes
00-syncrepo.sh Combined all-in-one repo sync script. Still alpha. Last tested: v1.6.5
@KaMeHb-UA
KaMeHb-UA / .bashrc
Created March 18, 2018 16:13
Beautiful and useful .bashrc example for TRUECOLOR terminals
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
@yashkumaratri
yashkumaratri / Google Colab SSH
Created December 31, 2018 05:19
SSH into google colab
#CODE
#Generate root password
import random, string
password = ''.join(random.choice(string.ascii_letters + string.digits) for i in range(20))
#Download ngrok
! wget -q -c -nc https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
! unzip -qq -n ngrok-stable-linux-amd64.zip
#Setup sshd
APK="$1"
if [ -f $APK ];then
./apktool d "$APK"
OIFS="$IFS"
IFS=$'\n'
grep -lR "\->loadAd" "${APK%.*}" | xargs -d '\n' -- sed -i '/\->loadAd/d'
IFS="$OIFS"
./apktool b "${APK%.*}" -o "${APK%.*}_no_ad.apk"
java -jar sign.jar --overwrite --apks "${APK%.*}_no_ad.apk"
rm -rf "${APK%.*}"
@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")