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
function cdxcode() | |
{ | |
path="`osascript ~/Codes/scripts/cdxcode.scpt 2>/dev/null`" | |
if [ -n "$path" ]; then | |
echo "cd to $path" | |
cd "$path" | |
else | |
echo "no Xcode Project finded" | |
fi | |
} |
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 ruby | |
def usage | |
puts "USAGE: binary file.json/yaml [json/yaml] " | |
true | |
end | |
require 'yaml' | |
require 'json' |
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 | |
######################################### | |
#Function: update yum source | |
#Usage: bash update_yum_source.sh | |
#Author: Customer service department | |
#Company: Alibaba Cloud Computing | |
#Version: 2.1 | |
######################################### | |
check_os_release() | |
{ |
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
"四个空格 | |
set tabstop=4 | |
"使用space代替tab | |
set expandtab | |
" #自动缩进的宽度 | |
set shiftwidth=4 | |
" 根据文件中其他地方的缩进空格个数来确定一个 tab 是多少个空格 | |
set smarttab | |
" :retab 将所有 tab 扩展成空格,这样就完美了 |
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
for user in $(cut -f1 -d: /etc/passwd); | |
do | |
crontab -u $user -l 2>/dev/null | |
if [ $? -eq 0 ]; then | |
echo $user | |
echo "-------------------------------" | |
fi | |
done |
OlderNewer