Skip to content

Instantly share code, notes, and snippets.

@umi-uyura
umi-uyura / cyghere
Created Sep 2, 2016
Open current directory in Cygwin
View cyghere
#!/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 Apr 29, 2016
To display the computer name of the Mac
View showcompname
#!/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 Apr 29, 2016
To change the computer name of the Mac
View setcompname
#!/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 Apr 1, 2016
BacklogのSubversionリポジトリをバックアップするスクリプト
View backlogsvndump.sh
#!/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 Feb 17, 2016
Check for updated Homebrew Cask
View brewcaskcheckupdated
#!/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 Feb 9, 2016
Display cheat sheet for command using 'cheat' and 'tldr'
View how
#!/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 Sep 29, 2015
List of iOS Provisioning Profile
View iosprovisions
#!/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 Sep 29, 2015
List of iOS simulator
View iossimulators
#!/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 Sep 30, 2017
Check for updated for Casks.
View brewcaskupdate
#!/usr/bin/env bash
#
# Check for updated for Casks.
#
CMDNAME=`basename $0`
update_mark=""
function usage()
@umi-uyura
umi-uyura / brewcaskremoveall
Created Sep 29, 2015
Remove applications that depends on the Homebrew Cask
View brewcaskremoveall
#!/usr/bin/env bash
#
# Remove applications that depends on the Homebrew Cask
#
CMDNAME=`basename $0`
update_mark=""
function usage()