Skip to content

Instantly share code, notes, and snippets.

View ioslocaleidentifiers.csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
mr Marathi
bs Bosnian
ee_TG Ewe (Togo)
ms Malay
kam_KE Kamba (Kenya)
mt Maltese
ha Hausa
es_HN Spanish (Honduras)
ml_IN Malayalam (India)
ro_MD Romanian (Moldova)
candyan /
Created Aug 8, 2018 — forked from agentsim/
Create bootable ISO from HighSierra Installer
# Generate a BaseSystem.dmg with 10.13 Install Packages
hdiutil attach /Applications/Install\ macOS\ 10.13\ -noverify -mountpoint /Volumes/highsierra
hdiutil create -o /tmp/HighSierraBase.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierraBase.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\ 10.13\ -target /Volumes/install_build -noprompt -noverify -erase
cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation
hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil detach /Volumes/highsierra/
mv /tmp/HighSierraBase.cdr.dmg /tmp/BaseSystem.dmg
candyan /
Created Aug 8, 2018 — forked from julianxhokaxhiu/
Simple bash script to create a Bootable ISO from macOS Sierra Install Image from Mac App Store
# Credits to fuckbecauseican5 from
# Adapted to work with the official image available into Mac App Store
# Enjoy!
hdiutil attach /Applications/Install\ macOS\ -noverify -nobrowse -mountpoint /Volumes/install_app
hdiutil create -o /tmp/Sierra.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/Sierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build
yum install git -y
yum install vim -y
yum install wget -y
curl -o
git clone -b berrylab
pip install supervisor
mkdir -p /var/log/supervisor/
candyan /
Last active Sep 1, 2017 — forked from mustafaturan/
Installs latest ffmpeg on Centos 6
# source:
yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
curl -L -O
tar xzvf yasm-1.2.0.tar.gz
cd yasm-1.2.0
# coding=utf8
import requests
class HDCourse:
def __init__(self, id, title, teacher_name, videos): = id
self.title = title
View gist:bfd537fa549510ab411ed08c28192fc8
ffmpeg -i $video_file -vn -ar 16000 -ac 1 -acodec pcm_s16le -ss 00:01:00 -t 00:00:30 $audio.wav
-vn 排除视频 (-an 排除音频 / -sn 排除字幕)
-ar 采样率
-ac 声道数量
-acodec 编码 ( flac / pcm_s16le(16bit 线性PCM) )
-ss 开始时间点
-t 时长
candyan / gist:a048abe577ec7c351a10351209b4f634
Last active Oct 10, 2016
zepto.js swipeUp & swipeDown not working on mobile device
View gist:a048abe577ec7c351a10351209b4f634
add the listener to disable browser scroll.
```document.addEventListener('touchmove', function (event) {
}, false);
candyan / gist:054960b2100dd192b0b89e61031e4c46
Created Sep 5, 2016
Error: FBSDKInternalUtility viewControllerforView No know class method
View gist:054960b2100dd192b0b89e61031e4c46
tips: use viewControllerForView instead of viewControllerforView
candyan / gist:363ea4dbdcbceba28869
Last active Jan 21, 2016
iPhone & Android 通用的最佳全屏尺寸
View gist:363ea4dbdcbceba28869
1152 * 1920 (这个结论是通过统计和计算得出的)