Skip to content

Instantly share code, notes, and snippets.

View wechain's full-sized avatar

Anthony Lai wechain

  • Kuala Lumpur, Malaysia
View GitHub Profile
@wechain
wechain / 00_instructions.md
Created August 10, 2018 14:30 — forked from germanny/_instructions.md
Instructions for setting up OSX 10.X.X

Setup OSX 10.X with a Clean Install

About once a year, my machine gets pretty sluggish and it's time to start fresh. Here's the process I use to update it with everything I need.

  • Back up all photos, music, apps, iTunes library, keychains, etc.
  • Deauthorize iTunes and Photoshop.
  • Deactivate CleanMyMac 3 license.
  • 1Password, Dropbox, Evenote sync
@wechain
wechain / brewfile
Created August 10, 2018 19:19 — forked from germanny/brewfile
brewfile
cask_args appdir: '/Applications'
#
# 1 taps
#
# homebrew dupes
tap 'homebrew/dupes'
# homebrew versions
@wechain
wechain / gist:c59766c6b7a67913c8f3d30728c1e532
Created August 12, 2018 08:29 — forked from mestizo/gist:9167834
Completely disable IPv6 on OSX
#To Get List of Hardware
sudo networksetup -listallhardwareports
#To Disable IPv6 on Wifi Adapter
sudo networksetup -setv6off wi-fi
#To Disable IPv6 on Built-in Ethernet Adapter
sudo networksetup -setv6off Ethernet
// 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
@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 */;
@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 / 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:

@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 / 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
<div class="text-rtl">
<p>
<h5>לתמונת הפרופיל ולתמונת הנושא שלכם יש חשיבות גדולה לשגשוג שלכם בסטימאיט מכיוון שהם ממתגים את הפרופיל שלכם וגורמים לו להיות זכיר בין מגוון הפוסטים בקהילה. <br>
בפוסט זה אסביר כיצד ליצור תמונת פרופיל ונושא נכונים, כיצד להעלות אותם לאינטרנט ואיך לגרום לתמונה להופיע בפרופיל האישי.<br>
קריאה מהנה!😉 <br> <br>
https://i.imgur.com/znTupeP.png
</h5>
<hr>