Skip to content

Instantly share code, notes, and snippets.

@sodabiscuit
sodabiscuit / .sh
Last active May 9, 2018 12:40
random_rename_corp
#!/usr/bash
# while read p; do
# url="${p}?x-oss-process=image/resize,w_1000/quality,Q_60"
# wget $url -O ${p##*/}
# #sleep .5
# done <./images
random_files=`ls ./shop | gshuf -n 6000`
unset IFS
for f in $random_files; do
@sodabiscuit
sodabiscuit / xcrun_openurl
Created May 31, 2015 07:01
Open Some Application Scheme URL in the Booted iOS Simulator.
#!/bin/sh
xcrun simctl list | grep 'Booted' | awk -F "[()]" '{ for (i=2; i<NF-1; i+=2) print $i }' | xargs -J {} xcrun simctl openurl '{}' $1
@sodabiscuit
sodabiscuit / xcode_plugin_auto_compatible.sh
Last active May 4, 2016 05:21
Xcode Plugin AutoCompatible
#!/bin/bash
XCODE_UUID=$(defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID)
PLUGIN_PATH="$HOME/Library/Application Support/Developer/Shared/Xcode/Plug-ins"
for plugin in "$PLUGIN_PATH"/*.xcplugin ; do
defaults write "${plugin}"/Contents/Info DVTPlugInCompatibilityUUIDs -array-add $XCODE_UUID
done
@sodabiscuit
sodabiscuit / linux_font_render
Created March 4, 2013 07:13
linux font render
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Info:
Latest version: http://forums.gentoo.org/viewtopic-p-6183606.html#6183606
xeffects thread: http://forums.gentoo.org/viewtopic-t-511382.html
Sub-pixel hinting: http://www.infinality.net/blog/?p=67
Alternative: https://wiki.ubuntu.com/Fonts
@sodabiscuit
sodabiscuit / filesystem_is_full_
Last active December 14, 2015 03:18
freenas shell script
setenv PKG_TMPDIR /mnt/ZFS_VOLUME0/pkg_tmp