Let's say you saved the output of a PayPal NVP API request to output.txt
.
To parse it to JSON:
yarn start output.txt
#! /bin/bash | |
MAILTO=$(whoami) | |
SHELL=/bin/bash | |
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | |
# directory to save backups in, must be rwx by dokku user | |
BASE_DIR="/var/lib/dokku/data/storage/backups/postgres" | |
YMD=$(date "+%Y-%m-%d") | |
DIR="$BASE_DIR/$YMD" |
alias report="dokku ps:report | grep -e '=====>' -e 'Status'" |
Let's say you saved the output of a PayPal NVP API request to output.txt
.
To parse it to JSON:
yarn start output.txt
(* | |
Author: Julien Ma - https://github.com/julienma | |
This script creates a new task in Omnifocus inbox, parsing a text file's content to create the task. | |
I use it to quickly create tasks from Android, using IFTTT's DO Note widget. | |
Installation (on the computer where you use Omnifocus): | |
- Setup this IFTTT applet: https://ifttt.com/applets/47483145d-send-to-omnifocus | |
(Basically a DO Note to a Dropbox folder, with the note as the file content) | |
- Put a copy of the script in /Library/Scripts/Folder Action Scripts or ~/Library/Scripts/Folder Action Scripts. |
#!/bin/bash | |
# | |
# Don't forget to `chmod +x update-wordpress.sh` | |
# | |
# Updates WordPress to a new version. | |
# | |
# The MIT License (MIT) | |
# Copyright (c) 2016 Sander Venema <sander@sandervenema.ch> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy |
This is a cheat sheet I developed for students while teaching an Intro to Web Development course through Lighthouse Labs. If you're interested in learning to code, you should definitely check them out.
### Move a directory out of an existing repo, and push it to its own repo, keeping only relevant commits: | |
See http://teach.github.com/articles/lesson-filter-branch/ |
<?xml version="1.0"?> | |
<root> | |
<deviceproductdef> | |
<productname>LOGITECH_K811</productname> | |
<productid>0xb317</productid> | |
</deviceproductdef> | |
<item> | |
<name>Logitech K811 Eject to Next / Previous Tracks</name> |
#!/bin/bash | |
# | |
# Download latest PG backup for an Heroku app. | |
# See https://devcenter.heroku.com/articles/heroku-postgres-backups#downloading-your-backups | |
# | |
# Usage: | |
# Don't forget to chmod +x the script, then: | |
# | |
# $ ./download_latest_pgbackup_from_heroku.sh {HEROKU_APPNAME} | |
# |
rsync -e 'ssh -p 12345 -i ~/.ssh/id_custom_rsa' --stats --progress -vaz ~/local-folder julien@host.com:~/remote-folder |