Skip to content

Instantly share code, notes, and snippets.

@umi-uyura
umi-uyura / cyghere
Created September 2, 2016 03:19
Open current directory in Cygwin
#!/bin/sh
#
# Cygwin here for gnupack
#
# Require:
# - gnupack (http://gnupack.osdn.jp/)
# - <gnupack_root>/startup_config.ini
# [startup_cygwin.exe]
# Chdir_With_Clipboard = yes
@umi-uyura
umi-uyura / showcompname
Created April 29, 2016 14:41
To display the computer name of the Mac
#!/bin/sh
computer_name=$(scutil --get ComputerName)
local_host_name=$(scutil --get LocalHostName)
host_name=$(scutil --get HostName)
echo "Computer Name : $computer_name"
echo "Local Host Name : $local_host_name"
echo "Host Name : $host_name"
@umi-uyura
umi-uyura / setcompname
Created April 29, 2016 14:39
To change the computer name of the Mac
#!/bin/sh
computer_name=$(scutil --get ComputerName)
local_host_name=$(scutil --get LocalHostName)
host_name=$(scutil --get HostName)
echo "Current setting: "
echo " Computer Name : $computer_name"
echo " Local Host Name : $local_host_name"
echo " Host Name : $host_name"
@umi-uyura
umi-uyura / backlogsvndump.sh
Last active April 1, 2016 14:48
BacklogのSubversionリポジトリをバックアップするスクリプト
#!/bin/bash
#
# Script to svnsync "Backlog" project repository.
#
if [ $# -ne 2 ]; then
echo "Usage: $0 [space key] [project key]"
exit 1;
fi
@umi-uyura
umi-uyura / brewcaskcheckupdated
Created February 17, 2016 06:42
Check for updated Homebrew Cask
#!/bin/sh
#
# Check for updated for Casks.
#
HOMEBREW_CASK_ROOT="/opt/homebrew-cask/Caskroom/"
TREE_COMMAND=`which tree`
JQ_COMMAND=`which jq`
if [ "" == $TREE_COMMAND ]; then
@umi-uyura
umi-uyura / how
Created February 9, 2016 11:37
Display cheat sheet for command using 'cheat' and 'tldr'
#!/bin/sh
#
# How - cheat and tldr
#
function usage()
{
cat << EOF
Display cheat sheet for command using 'cheat' and 'tldr'
@umi-uyura
umi-uyura / iosprovisions
Created September 29, 2015 06:38
List of iOS Provisioning Profile
#!/bin/sh
TMP_DIR="ProvisioningPlists"
PROVISIONING_PROFILE_LIST=$(find ~/Library/MobileDevice/Provisioning\ Profiles/ -name "*.mobileprovision")
IFS='
'
profile_list=($PROVISIONING_PROFILE_LIST)
rm -rf /tmp/${TMP_DIR}/
@umi-uyura
umi-uyura / iossimulators
Created September 29, 2015 06:37
List of iOS simulator
#!/bin/sh
DEVICE_PLIST=$(find ~/Library/Developer/CoreSimulator/Devices/ -name device.plist)
device_list=($DEVICE_PLIST)
devices=()
for i in "${device_list[@]}"
do
udid=$(/usr/libexec/PlistBuddy -c "Print UDID" ${i})
@umi-uyura
umi-uyura / brewcaskupdate
Last active September 30, 2017 05:04
Check for updated for Casks.
#!/usr/bin/env bash
#
# Check for updated for Casks.
#
CMDNAME=`basename $0`
update_mark=""
function usage()
@umi-uyura
umi-uyura / brewcaskremoveall
Created September 29, 2015 06:28
Remove applications that depends on the Homebrew Cask
#!/usr/bin/env bash
#
# Remove applications that depends on the Homebrew Cask
#
CMDNAME=`basename $0`
update_mark=""
function usage()