cd ~/Desktop
mkdir wget-build
cd wget-build
This file contains hidden or 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
cd editline && test -f config.h || CFLAGS="-D_THREAD_SAFE -I../..//include -I/opt/local/include -fno-strict-aliasing -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2 -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -D__Darwin__ -mmacosx-version-min=10.6 -O3 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 " LDFLAGS="-L/opt/local/lib -L/usr/local/lib " ./configure --build=x86_64-apple-darwin14.0.0 --host=x86_64-apple-darwin14.0.0 --with-ncurses=/opt/local --with-curses= --with-termcap= --with-tinfo= | |
loading cache ./config.cache | |
checking for gcc... gcc | |
checking whether the C compiler (gcc -D_THREAD_SAFE -I../..//include -I/opt/local/include -fno-strict-aliasing -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2 -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -D__Darwin__ -mmacosx-version-min=10.6 -O3 -U_FORTIFY_SOU |
This file contains hidden or 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
$ port installed | |
The following ports are currently installed: | |
cctools @855_1+llvm35 (active) | |
cctools-headers @855_0 (active) | |
cloog @0.18.2_2 (active) | |
expat @2.1.0_0 (active) | |
gcc48 @4.8.3_2 (active) | |
gcc_select @0.1_8 (active) | |
gdbm @1.11_1 (active) | |
gettext @0.19.3_1 (active) |
This file contains hidden or 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
sudo port sync | |
sudo port install gcc48 | |
sudo port install glib2-devel | |
sudo port install jansson | |
curl -O http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-12.7.0.tar.gz | |
tar -xzf asterisk-12.7.0.tar.gz | |
cd asterisk-12.7.0 | |
run port select --set gcc mp-gcc48 | |
./configure —with-jansson=/opt/local |
This file contains hidden or 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
# my attempted manual build process | |
tar xzf asterisk-12.6.1.tar.gz | |
cd asterisk-12.6.1 | |
./bootstrap.sh | |
./configure --disable-option-checking --prefix=/usr/local --without-netsnmp --without-gtk2 --with-ssl=/usr/local/opt/openssl --with-sqlite3=/usr/local/opt/sqlite --with-unixodbc=/usr/local/opt/unixodbc CC=/usr/local/bin/gcc-4.8 CXX=/usr/local/bin/g++-4.8 CPP=/usr/local/bin/cpp-4.8 CFLAGS=-fno-strict-aliasing | |
CC=/usr/local/bin/gcc-4.8 ; CXX=CC=/usr/local/bin/g++-4.8 ; CPP=/usr/local/bin/cpp-4.8 ; CFLAGS=-fno-strict-aliasing ; make menuselect/cmenuselect menuselect/nmenuselect menuselect/gmenuselect menuselect/menuselect menuselect-tree menuselect.makeopts | |
menuselect/menuselect --enable DISABLE_INLINE menuselect.makeopts | |
menuselect/menuselect --disable BUILD_NATIVE menuselect.makeopts | |
CC=/usr/local/bin/gcc-4.8 ; CXX=CC=/usr/local/bin/g++-4.8 ; CPP=/usr/local/bin/cpp-4.8 ; CFLAGS=-fno-strict-aliasing ; make all NOISY_BUILD=1 |
This file contains hidden or 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
$ brew install -vd ~/Projects/homebrew-asterisk/asterisk.rb | |
/usr/local/Library/brew.rb (Formulary::FromPathLoader): loading /Users/someuser/Projects/homebrew-asterisk/asterisk.rb | |
/usr/local/Library/brew.rb (Formulary::StandardLoader): loading /usr/local/Library/Taps/homebrew/homebrew-versions/gcc48.rb | |
/usr/local/Library/brew.rb (Formulary::StandardLoader): loading /usr/local/Library/Taps/homebrew/homebrew-versions/gmp4.rb | |
/usr/local/Library/brew.rb (Formulary::StandardLoader): loading /usr/local/Library/Taps/homebrew/homebrew-versions/libmpc08.rb | |
/usr/local/Library/brew.rb (Formulary::StandardLoader): loading /usr/local/Library/Taps/homebrew/homebrew-versions/mpfr2.rb | |
/usr/local/Library/brew.rb (Formulary::StandardLoader): loading /usr/local/Library/Taps/homebrew/homebrew-versions/cloog018.rb | |
/usr/local/Library/brew.rb (Formulary::StandardLoader): loading /usr/local/Library/Formula/pkg-config.rb | |
/usr/local/Library/brew.rb (Formulary::StandardLoader): loading /usr/local/Library/Taps/homebrew/homebrew-versions |
This file contains hidden or 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 | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | env LC_CTYPE=C tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | env LC_CTYPE=C tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
This file contains hidden or 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
# | |
# This is the simplest and cleanest way I've come up with for securely compressing (gzip, in this example) & encrypting data to disk with OpenSSL from a bash script without exposing the password to inspection of process or environment variable using `ps` and the likes. Naturally, `cat` is just used as an example so the data can come from anywhere. If the compressed data is to be sent via email instead of written to disk, don't use '-out' and use '-a' to base64 encode the compressed data. | |
# | |
# References: | |
# http://www.madboa.com/geek/openssl/#encrypt-simple | |
# http://unix.stackexchange.com/questions/29111/safe-way-to-pass-password-for-1-programs-in-bash#answer-29186 | |
# http://stackoverflow.com/questions/6607675/shell-script-password-security-of-command-line-parameters/6607773#6607773 | |
# https://gist.github.com/philfreo/2321650 | |
cat "$file" | gzip -c | openssl enc -e -salt -aes-256-cbc -pass fd:3 -out "$file.gz.enc" 3<<<"$password" |
This file contains hidden or 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
/** Send a message to a method in a frame by name with an array of parameters | |
* | |
* @param rcvr [in] レシーバ | |
* @param frame [in] Frame | |
* @param message [in] Message | |
* @param params [in] Parameters | |
* | |
* @return Return value | |
*/ | |
newtRef NsPerform(newtRefArg rcvr, newtRefArg frame, newtRefArg message, newtRefArg params) |
This file contains hidden or 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
Mirroring homepage.mac.com sites to mirrors.unna.org: | |
1) Use `wget` to pull down a copy of the site. If pulling down a single file & all its prerequisites, use the following: | |
/usr/local/bin/wget -p --mirror -k -t 30 -w 5 -e robots=off -o homepage.mac.com-splorp.$(date +%Y-%m-%d-%H%M).log "http://homepage.mac.com/splorp/PhotoAlbum3.html" & | |
Alternatively, if pulling down an entire directory, use the following (Note: _make sure_ you include the trailing slash on the directory name!): | |
/usr/local/bin/wget --mirror -k -t 30 -w 5 -e robots=off -o homepage.mac.com-splorp.$(date +%Y-%m-%d-%H%M).log "http://homepage.mac.com/splorp/" & |