-
install Xcode
-
install Xcode command line tools
http://cmd.hhmr.biz/2013/09/mavericksxcode-command-line-tools.html
- setup the xcode path
$ sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/
install Xcode
install Xcode command line tools
http://cmd.hhmr.biz/2013/09/mavericksxcode-command-line-tools.html
$ sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/
#include "stdio.h" | |
void setNumberTo10(int n) { | |
printf("\n%s:\n", __func__); | |
printf("n 記憶體位址 = %p, n 記憶體位址 size = %zu\n", &n, sizeof(&n)); | |
printf("n 記憶體空間的值 = %d, n 記憶體空間的 size = %zu\n", n, sizeof(n)); | |
n = 10; | |
printf("n = %d\n\n", n); | |
} |
#!/bin/bash | |
echo "Remove unwanted adware that displays pop-up ads and graphics on your Mac" | |
echo "https://support.apple.com/en-us/HT203987" | |
echo "" | |
# 1. Downlite, VSearch, Conduit, Trovi, MyBrand, Search Protect, Buca Apps | |
echo "1. Remove Downlite, VSearch, Conduit, Trovi, MyBrand, Search Protect, Buca Apps" | |
echo "" | |
malware[0]="/System/Library/Frameworks/v.framework" | |
malware[1]="/System/Library/Frameworks/VSearch.framework" |
#!/bin/bash | |
# When Xcode is upgrade, Xcode Plugin will not work at all. | |
# Use this script to update all your Xcode plugin's compatibility. | |
# https://github.com/supermarin/Alcatraz/issues/213#issuecomment-91288935 | |
# show Xcode version and UUID | |
xcodebuild -version | |
uuid=$(defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID) | |
echo "UUID $uuid" | |
echo "" |
# [MAC OSX] Show/Hide the hidden files in Finder. | |
# add this function to '~/.bash_profile' and reopen terminal. | |
# Usage: show-file -> show | |
# show-file 0 / off / hide / false -> hide | |
show-file () { | |
opt=$(echo $1 | tr '[:upper:]' '[:lower:]') # transfer into lowercase | |
# Hide Files | |
if [ "$opt" = "off" ] || [ "$opt" = "0" ] || [ "$opt" = "false" ] || [ "$opt" = "hide" ] ; then |
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Fn + Cmd to LeftClick</name> | |
<identifier>private.fn2leftclick</identifier> | |
<autogen>__KeyToPointingButton__ KeyCode::FN, ModifierFlag::COMMAND_L, PointingButton::LEFT</autogen> | |
</item> | |
</root> |
#!/bin/bash | |
# function replace (file_name, line_number, replace_string) | |
replace () { | |
file=$1 | |
number=$2 | |
string=$3 | |
n=1 | |
cat $file | while read line |
import fs from 'fs' | |
var output = fs.readFileSync('input.txt', 'utf8') | |
.trim() // remove end of line | |
.split('\n') | |
.map(line => line.split('\t')) | |
.reduce((customers, [ user, name, price, quality ]) => { | |
customers[user] = customers[user] || []; | |
customers[user].push({ name, price, quality }); | |
return customers; |
.container { | |
display: flex; /* or inline-flex */ | |
/* Flexbox is a single-direction layout concept */ | |
flex-direction: row | row-reverse | column | column-reverse; | |
flex-wrap: nowrap | wrap | wrap-reverse; | |
flex-flow: <‘flex-direction’> || <‘flex-wrap’>; | |
/* main axis */ | |
justify-content: flex-start | flex-end | center | space-between | space-around; |
<!-- https://pqrs.org/osx/karabiner/faq.html.en#unicode-hex-input --> | |
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Use right option as unicode hex input modifier</name> | |
<appendix>- right option + ← = ← (U+2190)</appendix> | |
<appendix>- right option + ↑ = ↑ (U+2191)</appendix> | |
<appendix>- right option + → = → (U+2192)</appendix> | |
<appendix>- right option + ↓ = ↓ (U+2193)</appendix> | |
<identifier>private.unicode_hex_input_modifier</identifier> |