brew install ffmpeg
ffmpeg -i input.mp4 -c copy -metadata:s:v:0 rotate=90 output.mp4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function uuid() | |
math.randomseed(os.time()) | |
local template ='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' | |
return string.gsub(template, '[xy]', function (c) | |
local v = (c == 'x') and math.random(0, 0xf) or math.random(8, 0xb) | |
return string.format('%x', v) | |
end) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function tftpd | |
switch $argv | |
case start | |
sudo rm -rf /private/tftpboot | |
sudo ln -s (pwd) /private/tftpboot | |
sudo launchctl load -w /System/Library/LaunchDaemons/tftp.plist | |
case stop | |
sudo launchctl unload -w /System/Library/LaunchDaemons/tftp.plist | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { compose, withState, withProps } from 'recompose' | |
function HoCComponent ({a, b, c, setA, setB}) { | |
return ( | |
<div> | |
<span>A: {a}</span> | |
<button onClick={setA}>Update A</button> | |
<span>B: {b}</span> | |
<button onClick={setB}>Update B</button> | |
<span>C: {c}</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Convert <input/> to <textarea/> to preserve line-breaks. | |
*/ | |
function replaceInputWithTextarea(input) { | |
if (input.type !== 'text') return; | |
// Create textarea element. | |
const textarea = document.createElement('textarea'); | |
// Copy all input attributes except `value`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: Setup bootstrap script | |
IF NOT [%1]==[--skip-setup] ( | |
:: Allow (, ), ^, <, >, |, ... in the file name | |
:: See https://stackoverflow.com/a/36990712 | |
SETLOCAL EnableDelayedExpansion | |
SET "EXECUTABLE_PATH=%~dpnx0" | |
ECHO AutoRun "!EXECUTABLE_PATH!" |
code | description |
---|---|
<%_ term %> |
translate with i18n |
<%: term %> |
translate with i18n and escape XML |
<%+ path/to/template %> |
include template from view dir (/usr/lib/lua/luci/view ) |
<%= expression %> |
print expression |
<%# comment %> |
comment |
<%- |
remove whitespaces on the left |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
channel spectrum | |
ready | |
SELECT_AP -> ready | |
SCAN -> loading | |
loading | |
CANCEL_SCAN -> ready | |
SCAN_SUCCESS -> chart | |
SCAN_FAILURE -> error | |
chart | |
SELECT_AP -> ready |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Build Zsh from sources on Debian Wheezy. | |
# From http://zsh.sourceforge.net/Arc/git.html and sources INSTALL file. | |
# Some packages may be missing | |
sudo apt-get install -y git-core gcc make autoconf yodl libncursesw5-dev texinfo | |
git clone git://git.code.sf.net/p/zsh/code zsh | |
cd zsh |
OlderNewer