Instantly share code, notes, and snippets.

View to_hevc.sh
#!/bin/bash
#
# This script automatically converts a directory of video files to H.265 HEVC with the nightly iteration of HandBrake.
# https://handbrake.fr/nightly.php
# The nightly is required because the current stable release (as of writing this) does not support the "hvc1" codec
# that tvOS requires on top of only really liking mp4/m4a.
#
if [ -z "$1" ]; then
SRC="."
else
View simple_convert.py
# Python 2.7
import os
import sys
import time
import platform
import subprocess
import urllib2
import logging
View recursive-m4v-convert.sh
#!/bin/bash
#
# Change this to specify a different handbrake preset. You can list them by running: "HandBrakeCLI --preset-list"
#
#set -ux
set +e
PRESET="Vimeo YouTube 720p30" # or Fast 720p30 or Fast 1080p30
if [ -z "$1" ] ; then
TRANSCODEDIR="."
else
View Web-Vimeo-YouTube-HQ-720p60.json
{
"PresetList": [
{
"AlignAVStart": false,
"AudioCopyMask": [
"copy:aac",
"copy:ac3",
"copy:eac3",
"copy:dtshd",
"copy:dts",
View handbrake_cli.md

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
View steemit-post-template.html
<div class="text-rtl">
<p>
<h5>לתמונת הפרופיל ולתמונת הנושא שלכם יש חשיבות גדולה לשגשוג שלכם בסטימאיט מכיוון שהם ממתגים את הפרופיל שלכם וגורמים לו להיות זכיר בין מגוון הפוסטים בקהילה. <br>
בפוסט זה אסביר כיצד ליצור תמונת פרופיל ונושא נכונים, כיצד להעלות אותם לאינטרנט ואיך לגרום לתמונה להופיע בפרופיל האישי.<br>
קריאה מהנה!😉 <br> <br>
https://i.imgur.com/znTupeP.png
</h5>
<hr>
View htmltomd.sh
#!/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
View Bullseye.bookmarklet
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());})();
View ipfs-server-setup.md

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:

View keybase.md

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: