Skip to content

Instantly share code, notes, and snippets.

@dragonken
dragonken / index.html
Last active August 29, 2015 14:22
wagXgQ
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<div class="content">
@dragonken
dragonken / saveUnicodeCSV.bas
Created July 12, 2016 13:40
Excel export Selection to UTF-8 CSV file
Sub saveUnicodeCSV()
'Excel export Selection to UTF-8 CSV file
Set oAdoS = CreateObject("ADODB.Stream")
oAdoS.Charset = "UTF-8"
oAdoS.Mode = 3
oAdoS.Type = 2
oAdoS.Open
Dim rng As Range
@dragonken
dragonken / gist:98859a6c91318bc8cc875ecf46cc986b
Created August 19, 2016 19:11
Mac Finder hide hidden FIles
#!/bin/bash
#Finder show hidden
defaults write com.apple.finder AppleShowAllFiles true
killall Finder
#Fast Keyboard
defaults write NSGlobalDomain KeyRepeat -int 1
defaults read NSGlobalDomain KeyRepeat
{"keys": ["command+shift+i"], "command": "reindent", "args": {"single_line": false}}
#!/bin/bash
find . -name "_____padding_file_*" -type f -exec mv {} padding \;
@dragonken
dragonken / .zshrc
Last active July 27, 2017 06:24
zsh terminal local history
# move throug local history, search everything
# https://github.com/robbyrussell/oh-my-zsh/issues/2537
setopt no_share_history
# or
unsetopt share_history
@dragonken
dragonken / ffmpeg-mkv-to-mp4.sh
Created August 11, 2017 17:04 — forked from pwenzel/ffmpeg-mkv-to-mp4.sh
MKV and AVI to MP4 Conversion for Apple TV
# See also https://trac.ffmpeg.org/wiki/Encode/AAC
# direct copy
ffmpeg -i input.mkv -c:v copy -c:a copy output.mp4
# direct copy video, but convert audio to AAC with default variable bit rate
ffmpeg -i input.mkv -c:v copy -c:a aac -strict experimental output.mp4
# direct copy video, but convert audio to AAC with constant bit rate
ffmpeg -i input.mkv -c:v copy -c:a aac -strict experimental -b:a 320k output.mp4
@dragonken
dragonken / ramdisk.sh
Created August 16, 2017 12:50 — forked from rxin/ramdisk.sh
ramdisk create/delete on Mac OS X.
#!/bin/bash
# From http://tech.serbinn.net/2010/shell-script-to-create-ramdisk-on-mac-os-x/
#
ARGS=2
E_BADARGS=99
if [ $# -ne $ARGS ] # correct number of arguments to the script;
then
@dragonken
dragonken / auto-remove-sublime-license-popup
Created August 17, 2017 20:17 — forked from egel/auto-remove-sublime-license-popup
Auto-remove Sublime's license popup
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sublime_plugin
import subprocess
from time import sleep
import sys
cl = lambda line: subprocess.Popen(line, shell=True, stdout=subprocess.PIPE).communicate()[0].strip()
log = lambda message: sys.stderr.write("Log: %s\n" % message)
@dragonken
dragonken / ffmpeg-cheatsheet.md
Created August 18, 2017 17:37 — 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