Skip to content

Instantly share code, notes, and snippets.

@astrataro
astrataro / uninstall-ghostscript.sh
Created October 8, 2019 05:24 — forked from gwerbin/uninstall-ghostscript.sh
Uninstall Ghostscript that comes with MacTex
#!/usr/bin/env bash
# The MacTex website (https://www.tug.org/mactex/uninstalling.html) says it's "difficult"
# to uninstall Ghostscript, as installed by MacTex. Their suggestion is to:
# open the MacTeX-2015 install package and select "Show Files" from the resulting "File" menu of Apple's installer
# and then:
# Find files related to Ghostscript and remove them.
# which is exactly what this script does. It also prints the names of the deleted files, and moves the files to
# the user's Trash instead of actually deleting them. This can help you roll back the effects of the script in
# case something goes wrong.
@astrataro
astrataro / android-captive.sh
Last active October 24, 2018 05:03 — forked from tonyseek/android-captive.sh
Overrides the captive portal settings of Android in the People's Republic China Mainland
#!/usr/bin/env sh
adb shell "settings put global captive_portal_http_url http://dl.google.com/generate_204"
adb shell "settings put global captive_portal_https_url https://dl.google.com/generate_204"
adb shell "settings put global captive_portal_fallback_url https://www.qualcomm.cn/generate_204"
adb shell "settings put global captive_portal_other_fallback_urls https://connect.rom.miui.com/generate_204,https://captive.v2ex.co/generate_204,https://developers.google.cn/generate_204,https://www.google.cn/generate_204"
#!/bin/bash
# Author: Alexander Rodin <rodin.alexander@gmail.com>
# License: MIT
BUILD_DIR=build
while getopts "hp:s:r:b:o:c:nd:" opt; do
case $opt in
h)
echo "Usage: $0 [options]"
#!/bin/bash
################################
# OS X Install ISO Creater #
# #
# Author: shela #
################################
#######################################
# Declarations
@astrataro
astrataro / gist:4145836
Created November 25, 2012 23:18 — forked from anonymous/gist:4123913
sox ffmpeg support fix
diff --git a/m4/ffmpeg.m4 b/m4/ffmpeg.m4
index 11c8623..40e5ac4 100644
--- a/m4/ffmpeg.m4
+++ b/m4/ffmpeg.m4
@@ -49,7 +49,7 @@ then
LIBS="$LIBS $FFMPEG_LIBS"
have_ffmpeg="no"
AC_CHECK_HEADERS([libavformat/avformat.h ffmpeg/avformat.h],
- [AC_CHECK_LIB(avformat, av_open_input_file,
+ [AC_CHECK_LIB(avformat, avformat_open_input,
@astrataro
astrataro / gist:1462770
Created December 11, 2011 21:12 — forked from SAPikachu/gist:1131739
x264: skips depth filter when possible
a68cd9bf80f359d376cce02a295299302ed95d02
filters/video/depth.c | 7 +++++++
input/avs.c | 5 +++++
input/raw.c | 9 ++++++++-
x264.h | 1 +
4 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/filters/video/depth.c b/filters/video/depth.c
index 25dde25..b6cf1a5 100644
--- a/filters/video/depth.c