Skip to content

Instantly share code, notes, and snippets.

View mlzxy's full-sized avatar

Xinyu Zhang mlzxy

  • Rutgers University
  • New Brunswick, NJ
View GitHub Profile
@mlzxy
mlzxy / ffmpeg-install.sh
Last active August 29, 2015 14:26 — forked from clayton/ffmpeg-install.sh
Install FFMPEG on OS X with HomeBrew to convert Mp4 to WebM
# Installation
brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid
# Easy Peasy
ffmpeg -i video.mp4 video.webm
@mlzxy
mlzxy / install_ffmpeg_ubuntu.sh
Last active August 29, 2015 14:26 — forked from xdamman/install_ffmpeg_ubuntu.sh
Install latest ffmpeg on ubuntu 12.04 or 14.04
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
# <funtip><type> (<scope>): <subject>
# <body>
# <footer>
# FunTip
## Optional
## :art: when improving the format/structure of the code
@mlzxy
mlzxy / info.plist
Last active September 20, 2015 23:18 — forked from mlynch/info.plist
Disable App Transport Security in iOS 9
<!--
This disables app transport security and allows non-HTTPS requests.
Note: it is not recommended to use non-HTTPS requests for sensitive data. A better
approach is to fix the non-secure resources. However, this patch will work in a pinch.
To apply the fix in your Ionic/Cordova app, edit the file located here:
platforms/ios/MyApp/MyApp-Info.plist
And add this XML right before the end of the file inside of the last </dict> entry:
@mlzxy
mlzxy / osxLaunchAtStartup.swift
Created October 5, 2015 08:14 — forked from RGreinacher/osxLaunchAtStartup.swift
Swift / OS X: Launch app at startup
// Adding Login Items Using a Shared File List
// This is a combination of the code provided by the following Stackoverflow discussion
// http://stackoverflow.com/questions/26475008/swift-getting-a-mac-app-to-launch-on-startup
// (This approach will not work with App-Sandboxing.)
func applicationIsInStartUpItems() -> Bool {
return itemReferencesInLoginItems().existingReference != nil
}
func toggleLaunchAtStartup() {
@mlzxy
mlzxy / ubuntu-bootcamp.txt
Created October 25, 2015 21:33 — forked from mbohl/ubuntu-bootcamp.txt
Bootcamp your Ubuntu partition
1. Install Ubuntu on the partition of your choosing
2. Install VMWare Fusion
3. Get Grub Super Disk 2 (http://www.supergrubdisk.org/category/download/supergrub2diskdownload/super-grub2-disk-stable/)
4. Determine which partition you have Ubuntu installed to using "diskutil list"
5. Create the VMWare Configuration
a. Create a new VM
b. "Create a Custom Virtual Machine"
c. Type "Linux->Ubuntu 64 bit"
d. Either use the defaults or customize to your needs.
6. Create the virtual disk mapping to the real partition (this assumes you use the default names)
chrome.webRequest.onHeadersReceived.addListener(
function (details) {
for (var i = 0; i < details.responseHeaders.length; ++i) {
if (details.responseHeaders[i].name.toLowerCase() == 'x-frame-options') {
details.responseHeaders.splice(i, 1);
return {
responseHeaders: details.responseHeaders
};
}
}
@mlzxy
mlzxy / .eslintrc.js
Created December 28, 2015 21:53 — forked from nkbt/.eslintrc.js
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@mlzxy
mlzxy / tmux_local_install.sh
Last active May 20, 2016 19:56 — forked from ryin/tmux_local_install.sh
bash script for installing tmux without root access
#!/bin/bash
# Exit on error #
set -e
# Clean up #
rm -rf ~/programs/libevent
rm -rf ~/programs/ncurses
rm -rf ~/programs/tmux
# Variable version #
@mlzxy
mlzxy / caffe_error_solutions.md
Created May 24, 2016 09:32 — forked from Coldmooon/caffe_error_solutions.md
Caffe 安装错误记录及解决办法

Caffe 安装错误记录及解决办法

以后在博客里更新: http://coldmooon.github.io/

1)Fatal error : 'tr1/tuple' file not found

出现该问题有两种情况,可以先尝试下面的链接: BVLC/caffe#1358 如果不行,那说明是 Makefile 文件除了问题。一般来说,按照 BVLC/caffe#1740