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
#!/usr/bin/env python2.7 | |
from optparse import OptionParser | |
from subprocess import call | |
from os.path import splitext | |
import sys, os | |
def ffaac(filename, opts): | |
cmd = ['ffmpeg', '-hide_banner', '-y', '-i', filename, | |
'-c:a', 'libfdk_aac'] |
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/bash | |
# Usage: | |
# navigate the MacOS folder inside the app bundle you want to block | |
# usually where it is "SomeApp.app/Contents/MacOS" | |
# open terminal at current location | |
# run "blockit.sh executable" | |
# note the name "executable varies per apps" | |
# then this app is no longer be able to connect to internet. | |
if [[ -z "$1" ]];then |
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
cpv() { | |
if ! type -P pv >/dev/null;then | |
echo need pv >&2 | |
return 1 | |
fi | |
case $# in | |
0|1) | |
echo invalid arguments >&2 | |
return 1 | |
;; |
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
#!/usr/bin/env python2.7 | |
import plistlib as plib | |
import subprocess as subp | |
from contextlib import closing | |
import os, tempfile, shutil, re | |
from NameAppend import nameAppend | |
def parsePlistToString(plistFile=None): | |
'''parsePlistToString(plistFile) |
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
#!/usr/bin/env python2.7 | |
from PyQt4.QtCore import SIGNAL, pyqtSignal, QObject, QString | |
from PyQt4.QtGui import (QApplication, QDialog, | |
QTextBrowser, QPushButton, QVBoxLayout, | |
QLineEdit, QGridLayout, QTextCursor, | |
QLabel, QHBoxLayout, QFileDialog, | |
QCheckBox , QSizePolicy , QSpacerItem, | |
QGroupBox, QComboBox, QSpinBox) | |
import sys,os,re | |
import subprocess as subp |
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 sys | |
from PyQt4.QtGui import QPixmap, QApplication | |
import os | |
namebase='screenshit_' | |
num=1 | |
outdir= os.path.abspath(os.path.join(os.environ['HOMEPATH'],'Documents')) | |
while os.path.exists(os.path.join(outdir,namebase+str(num)+'.png')): | |
num+=1 | |
fulloutname = os.path.join(outdir, namebase + str(num) + '.png') |
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
#get absolute path(shell) | |
abspath(){ #{{{ | |
local thePath | |
if [[ ! "$1" =~ ^/ ]];then | |
thePath="$PWD/$1" | |
else | |
thePath="$1" | |
fi | |
IFS=/ parr=($thePath) | |
declare -a outp |
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/bash | |
[[ ! -f "$1" ]] && exit 1 | |
dmgfile="$1" | |
while read a b c;do | |
eval mp='$c' | |
done < <(hdiutil mount -noautofsck -noverify -noautoopen "$dmgfile"||exit 1) | |
echo Step 1 |
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/bash | |
# index icon dir file.zim | |
abspath(){ #{{{ | |
local thePath | |
if [[ ! "$1" =~ ^/ ]];then | |
thePath="$PWD/$1" | |
else | |
thePath="$1" | |
fi |