Skip to content

Instantly share code, notes, and snippets.

View tigefa4u's full-sized avatar
📉
🚀 😧 ☕ 🚬

Sugeng Tigefa tigefa4u

📉
🚀 😧 ☕ 🚬
View GitHub Profile
@tigefa4u
tigefa4u / stable-diffusion-ubuntu-2004-amd.sh
Created July 9, 2023 19:27 — forked from geerlingguy/stable-diffusion-ubuntu-2004-amd.sh
Install Stable Diffusion on an AMD GPU PC running Ubuntu 20.04
# Note: This will only work on Navi21 GPUs (6800/6900+).
# See: https://github.com/RadeonOpenCompute/ROCm/issues/1668#issuecomment-1043994570
# Install Conda (latest from https://docs.conda.io/en/latest/miniconda.html#linux-installers)
wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-x86_64.sh
bash Miniconda3-py39_4.12.0-Linux-x86_64.sh
# follow the prompts to install it, and run `conda` to make sure it's working.
# Install git and curl, and clone the stable-diffusion repo
sudo apt install -y git curl
@tigefa4u
tigefa4u / giffer.sh
Created July 15, 2022 04:59 — forked from pwm/giffer.sh
Gif gen
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p ffmpeg pngquant gifski gifsicle
# shellcheck shell=bash
set -euo pipefail
if [[ "$#" -ne 3 ]]; then
echo "Usage: gif.sh <name> <scale> <fps>"
exit 1
fi

Stuff to make gifs

Meshing gif

Here I used glob style input. I also had to pad because the image height was odd

ffmpeg -framerate 10 -pattern_type glob -i '*.jpg' -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" out.gif

ffmpeg -framerate 20 -pattern_type glob -i '*.jpg' -vf "scale=trunc(iw/4)*2:trunc(ih/4)*2" out.gif

@tigefa4u
tigefa4u / caddy-install-guide.md
Created June 18, 2022 17:28 — forked from coocheenin/caddy-install-guide.md
This is in-depth guide how to install a Caddy web server as service, that running from regular unprivileged user.

How to install and configure Caddy, a modern web server, running as a service on CentOS 6.8. You will also obtain a free SSL-Certificate for a website automatically.

This is in-depth guide how to install a modern web server named Caddy as service, that running from regular unprivileged user. You will also obtain a Free SSL-Certificate for a Website automatically.

Why Caddy?

Apache and Nginx are the two most common web servers in the world. Apache is a classical solution, but due to it's memory consumption (because to it's nature of creating a new process for each request) we will leave it for another occasion. Nginx is very fast and the RAM consumption is very-very low, if we need to serve static pages. But Nginx's configuration is not to easy read and understand, this is why we will try more flexible and clear solution, which is more intended for newbies.

Caddy is written is Go, open-source and pretty fast web server. If you're looking for low-memory solution the Cadd

@tigefa4u
tigefa4u / windows_activation.md
Created June 14, 2022 16:13 — forked from butageek/windows_activation.md
Activate Windows for free

For Windows 10

Step 1 - Open PowerShell or Command Prompt as administrator

Step 2 - Install KMS client key

slmgr /ipk your_license_key

Replace your_license_key with following volumn license keys according to Windows Edition:

@tigefa4u
tigefa4u / tilix_ubuntu_guide.md
Created May 27, 2022 10:57 — forked from agtbaskara/tilix_ubuntu_guide.md
Installation Guide for Tilix on Ubuntu

Install Tilix on Ubuntu 20.04

Install Tilix

sudo apt-get install tilix

Fix Tilix VTE

sudo ln -s /etc/profile.d/vte-2.91.sh /etc/profile.d/vte.sh
sudo chmod +x /etc/profile.d/vte.sh
@tigefa4u
tigefa4u / .licrc
Created January 17, 2022 00:06 — forked from robertohuertasm/.licrc
Simple .licrc config file for Licensebat
[licenses]
# This indicates which are the only licenses that Licensebat will accept.
# The rest will be flagged as not allowed.
accepted = ["MIT", "MSC", "BSD"]
# This will indicate which licenses are not accepted.
# The rest will be accepted, except for the unknown licenses or dependencies without licenses.
# unaccepted = ["LGPL"]
# Note that only one of the previous options can be enabled at once.
# If both of them are informed, only accepted will be considered.
@tigefa4u
tigefa4u / Dockerfile
Created September 10, 2018 03:13
Ruby and Rails docker example
FROM ruby:2.3.1-alpine
MAINTAINER Keifer Furzland <kfrz.code@gmail.com>
# Env
ENV REFRESHED_AT 2016-09-21
ENV REPO_DIR /home/ticketbuster/repo
ENV GEM_HOME /home/ticketbuster/gems
ENV ENV_FILE /home/ticketbuster/repo/.env
ENV BUILD_PACKAGES bash libffi-dev openssl-dev linux-headers zlib-dev readline-dev yaml-dev git curl-dev ruby-dev build-base
ENV RUBY_PACKAGES ruby-io-console ruby-bundler nodejs libxml2-dev mysql-dev mariadb-dev
@tigefa4u
tigefa4u / ffmpeg-cheatsheet.md
Created August 18, 2018 01:15 — forked from nickkraakman/ffmpeg-cheatsheet.md
FFmpeg cheat sheet for 360 video

FFmpeg Cheat Sheet for 360º video

Brought to you by Headjack

 
FFmpeg is one of the most powerful tools for video transcoding and manipulation, but it's fairly complex and confusing to use. That's why I decided to create this cheat sheet which shows some of the most often used commands.

 
Let's start with some basics:

  • ffmpeg calls the FFmpeg application in the command line window, could also be the full path to the FFmpeg binary or .exe file
@tigefa4u
tigefa4u / ffmpeg.md
Created August 18, 2018 01:06 — forked from Orangestar12/ffmpeg.md
personal quick ffmpeg cheat sheet

These are a few quick easy ffmpeg command lines that can be used to make oft-used video formats. I use them a lot so I wrote them down in a txt file but I converted it to markdown to upload here and access on all my pcs.

Feel free to use 'em. I've gathered them through superuser posts, wiki trawls, and personal experience.

General notes

  • Add -movflags faststart to make mp4 files have their headers at the beginning of the file, allowing them to be streamed (i.e. played even if only part of the file is downloaded).
  • mp4 container supports mp3 files, so if libfdk_aac isnt available (it's the only good aac enc) use libmp3lame.
  • For mp4 files, use -preset X to use mp4 enc presets, like slow or superfast. (veryfast or fast is ok)
  • c:v refers to the video codec used (codec: video). Likewise, c:a is audio. If you're using -map or something, this can be extended (-c:a:0: codec: audio: stream 0)