- If you don't have xpdf already:
brew install xpdf
- Convert the PDF to a postscript file:
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
import argparse | |
import subprocess | |
import os | |
import glob | |
from itertools import chain | |
import platform |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import requests | |
from bs4 import BeautifulSoup | |
from dateutil.parser import parse as parse_date | |
from collections import namedtuple | |
import re | |
import argparse | |
import getpass |
Add your user to the sudoers:
su -c 'EDITOR=vi visudo'
Install git, vim and a few other utilities and set vim as the default editor
sudo apt-get install git vim-nox gdebi xclip python-gpgme
function string_to_time(time_string) { | |
split(time_string, s, ",") | |
split(s[1], t, ":") | |
return 3600*t[1] + 60*t[2] + t[3] + s[2]/1000 | |
} | |
function correct_time(time_string) { | |
offset = -16.0 | |
start_time = string_to_time("00:00:00,000") |
Set up environment variables
export EPICS_BASE=/epics/base
export EPICS_HOST_ARCH=linux-x86_64
export P4USER=clarkenr #your perforce username
export P4PASSWD=secret #your perforce password
export P4CLIENT=clarkenr_SR00IOC99 #the perforce workspace you will be editing
export BUILD_CLIENT=/home/clarkenr/perforce #path to the root of the perforce workspace that you will build against
export BUILD_BASE=/home/clarkenr #path where the IOC build will be put
Use paste
and bc
to add up a column of numbers:
du -s *.pdf | cut -f 1 | paste -sd+ - | bc
Pretty diff: diff -y -W $(tput cols) file1 file2 | colordiff | less -R
Find non-ascii characters in vim: /[^\x00-\x7F]