Handy one-liners for sed
Mar. 23, 2001 - version 5.1 - compiled by Eric Pement pemente@northpark.edu
Latest version of this file is usually at:
-
This file is also available in Portuguese at:
Mar. 23, 2001 - version 5.1 - compiled by Eric Pement pemente@northpark.edu
Latest version of this file is usually at:
This file is also available in Portuguese at:
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
Install ImageMagick for image conversion:
brew install imagemagick
Install tesseract for OCR:
brew install tesseract --all-languages
Or install without --all-languages
and install them manually as needed.
#!/bin/sh | |
# Get MacOSX idletime. Shamelessly stolen from http://bit.ly/yVhc5H | |
/usr/sbin/ioreg -c IOHIDSystem | /usr/bin/awk '/HIDIdleTime/ {print int($NF/1000000000); exit}' |
First of all you need to be able to run MAMP in port 80. This is a "heat check" if you don't have any process jamming http ports. You can check it like this:
sudo lsof | grep LISTEN
If you do happen to have any process with something like this *:http (LISTEN)
, you are in trouble. Before with adventure check if it isn't MAMP itself (yeah, you should close that beforehand)
ps <pid of that process>
If you don't see MAMP, you are in good hands, I have just the thing for you:
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Pdfcrop | |
======= | |
Based on pdfcrop.pl_. Uses the BoundingBox [#]_ | |
Dependencies: | |
- PyPDF2_ |
#!/bin/bash | |
sudo apt-get install git python-pip make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev curl | |
sudo pip install virtualenvwrapper | |
git clone https://github.com/yyuu/pyenv.git ~/.pyenv | |
git clone https://github.com/yyuu/pyenv-virtualenvwrapper.git ~/.pyenv/plugins/pyenv-virtualenvwrapper | |
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc | |
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc |
-- Do a backup to iTunes and open "%APPDATA%\Apple Computer\MobileSync\Backup\*\3d0d7e5fb2ce288813306e4d4636395e047a3d28" as a SQLite database | |
SELECT chat.chat_identifier, message.is_from_me, datetime(message.date + 978307201, 'unixepoch') as date, message.text | |
FROM chat | |
JOIN chat_message_join on chat.ROWID = chat_message_join.chat_id | |
JOIN message on message.ROWID = chat_message_join.message_id | |
order by message.date |
# Invoke this script with a relative `.app` path | |
# EX: | |
# codesign.sh "dist/osx/MyApp-darwin-x64/MyApp.app" | |
# I had better luck using the iPhoneOS codesign_allocate | |
export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate" | |
#export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate" | |
# Next two are specified in Apple docs: | |
# export CODESIGN_ALLOCATE="/Applications/Xcode.app/Contents/Developer/usr/bin/codesign_allocate" |