Skip to content

Instantly share code, notes, and snippets.

View latompa's full-sized avatar

Thomas Olausson latompa

View GitHub Profile
@latompa
latompa / test.applescript
Created August 2, 2020 19:26
convert pages to pdf applescript
on run {input, parameters}
repeat with theFile in input
tell application "Finder"
set theFilesFolder to (folder of theFile) as text
end tell
tell application "Pages"
set theDoc to open theFile
set theDocName to name of theDoc
@latompa
latompa / fore.sh
Created November 13, 2017 16:38
foreman function
#
# add to your ~/.bashrc
#
fore () {
APP_DIR="$HOME/src/$1"
if [ -z "$1" ]
then
echo "missing app name"
return 0
@latompa
latompa / fore.sh
Created November 13, 2017 16:38
foreman function
#
# add to your ~/.bashrc
#
fore () {
APP_DIR="$HOME/src/$1"
if [ -z "$1" ]
then
echo "missing app name"
return 0
@latompa
latompa / ports
Created September 18, 2017 19:50
pow ports
cd ~/.pow
egrep '\d' ~/.pow/*
~/.pow/adminifi
3000
~/.pow/content-service
3005
~/.pow/engage
@latompa
latompa / README.md
Created October 24, 2016 02:37 — forked from oodavid/README.md
Backup MySQL to Amazon S3

Backup MySQL to Amazon S3

This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)

Sister Document - Restore MySQL from Amazon S3 - read that next

1 - Install s3cmd

this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc

[:multi,
[:mustache, :etag, [:mustache, :fetch, ["hello"]]],
[:static, "\n\n"],
[:mustache,
:section,
[:mustache, :fetch, ["repo"]],
[:multi,
[:static, " <b>"],
[:mustache, :etag, [:mustache, :fetch, ["name"]]],
@latompa
latompa / test.js
Last active August 29, 2015 14:28
test.js
javascript:(function myStuff() {
alert('here');
}
myStuff();
)();
class DateTime
attr_reader :date
attr_reader :time
end