Skip to content

Instantly share code, notes, and snippets.

View wechain's full-sized avatar

Anthony Lai wechain

  • Kuala Lumpur, Malaysia
View GitHub Profile
{
"PresetList": [
{
"AlignAVStart": false,
"AudioCopyMask": [
"copy:aac",
"copy:ac3",
"copy:eac3",
"copy:dtshd",
"copy:dts",
@wechain
wechain / handbrake_cli.md
Created November 7, 2018 07:40 — forked from zulhfreelancer/handbrake_cli.md
How to compress video using Handbrake CLI?

Step 1

Download HandBrake CLI for your OS here.

Step 2

cd into the folder where you have the HandBrakeCLI file and run this inside it:

./HandBrakeCLI -i /path/to/input.mov -o /path/to/output.mp4 -e x264 -q 28 -r 15 -B 64 -X 1280 -O
<div class="text-rtl">
<p>
<h5>לתמונת הפרופיל ולתמונת הנושא שלכם יש חשיבות גדולה לשגשוג שלכם בסטימאיט מכיוון שהם ממתגים את הפרופיל שלכם וגורמים לו להיות זכיר בין מגוון הפוסטים בקהילה. <br>
בפוסט זה אסביר כיצד ליצור תמונת פרופיל ונושא נכונים, כיצד להעלות אותם לאינטרנט ואיך לגרום לתמונה להופיע בפרופיל האישי.<br>
קריאה מהנה!😉 <br> <br>
https://i.imgur.com/znTupeP.png
</h5>
<hr>
@wechain
wechain / htmltomd.sh
Created October 24, 2018 12:48 — forked from ecampidoglio/htmltomd.sh
A Bash script that downloads the HTML source from a list of URLs and converts it to Markdown. The source file must contain each URL to download from on a separate line. The actual conversion is done by the awesome API available at http://heckyesmarkdown.com
#!/bin/bash
# htmltomd
# Downloads the HTML source from a list of URLs and converts it to Markdown.
# The source file must contain each URL to download from on a separate line.
# The actual conversion is done by the awesome API available at
# http://heckyesmarkdown.com
urlsFile=$1
outputDir=${2:-.} # Defaults to local dir
@wechain
wechain / Bullseye.bookmarklet
Created October 24, 2018 12:47 — forked from ttscoff/Bullseye.bookmarklet
A bookmarklet for grabbing just a piece of a web page and converting it to Markdown using heckyesmarkdown.com.
javascript:(function(){var p=document.createElement("p");p.innerHTML="<strong>Loading&hellip;</strong>";p.id="loadingp";p.style.padding="20px";p.style.background="#fff";p.style.left="20px";p.style.top=0;p.style.position="fixed";p.style.zIndex="9999999";p.style.opacity=".85";document.body.appendChild(p);document.body.appendChild(document.createElement("script")).src="https://cdn.rawgit.com/ttscoff/6109434/raw/Bullseye.js?x="+(Math.random());})();
@wechain
wechain / ipfs-server-setup.md
Created October 14, 2018 07:48 — forked from claus/ipfs-server-setup.md
Host Your Site Under Your Domain on IPFS

Host Your Site Under Your Domain on IPFS

This is a step-by-step tutorial for hosting your website under your domain on IPFS, from zero, on a DigitalOcean Ubuntu 16.04.3 x64 Droplet (i am using the $10 variant with 2GB RAM).

Install IPFS

Log in as root.

First, make sure the system is up to date, and install tar and wget:

Keybase proof

I hereby claim:

  • I am wechain on github.
  • I am wechain (https://keybase.io/wechain) on keybase.
  • I have a public key ASD6DRr75VBZgUIxOC8Yfq_zMmXgMYG-jT3UiUo5r1MdeQo

To claim this, I am signing this object:

@wechain
wechain / ffmpeg.md
Created September 22, 2018 11:59 — forked from protrolium/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

@wechain
wechain / schema.sql
Created August 12, 2018 17:58 — forked from skzap/schema.sql
SteemWhales db
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.5.36 - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Version: 8.3.0.4694
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
// steemwhales.com data importer
// this was made in the early days of steem
//
// a lot of things are wrong in it:
//
// how it doesnt use steemjs (it uses a super old module called steem rpc)
// the way it refreshes every existing accounts without priority for active accounts
// the way it stores the data (especially the history table)
// the way it counts followers (theres a much better API function for it now)
// it doesnt count delegation numbers