steps to reproduce:
curl 'http://thequeue.org/cr?id=https%3A%2F%2Faaronsw.jottit.com%2Fhowtoget&title=Aaron%20Swartz:%20howtoget' > how-to-get.html
html2text.py how-to-get.html > how-to-get.md
gist < how-to-get.md| -- Adapted from these sources: | |
| -- http://peterdowns.com/posts/open-iterm-finder-service.html | |
| -- https://gist.github.com/cowboy/905546 | |
| -- | |
| -- Modified to work with files as well, cd-ing to their container folder | |
| -- | |
| -- FINAL VERSION | |
| -- Save as "Application" from Automator and Drag&Drop to finder (see peterdowns post) | |
| -- |
| #!/usr/bin/env bash | |
| # global parameters | |
| g_tmp_folder="ncdc_tmp"; | |
| g_output_folder="ncdc_data"; | |
| g_remote_host="ftp3.ncdc.noaa.gov"; | |
| g_remote_path="pub/data/noaa"; | |
| # Install tmux on Centos release 6.5 | |
| # install deps | |
| yum install gcc kernel-devel make ncurses-devel | |
| # DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL | |
| curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz | |
| tar -xvzf libevent-2.0.21-stable.tar.gz | |
| cd libevent-2.0.21-stable | |
| ./configure --prefix=/usr/local |
osxfuse (3.x.x) from https://github.com/osxfuse/osxfuse/releases.ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"brew update$ brew install autoconf automake bison27 gd freetype t1lib mariadb gettext zlib mcrypt
curl -L https://github.com/php/php-src/pull/685.diff | patch -p1
| <?php | |
| /* | |
| Install: | |
| 1) create a folder: disablecsrf inside 'plugins/' directory. | |
| 2) place this file there and name it: disablecsrf.php | |
| 3) go to config/config.inc.php, and add it to plugins, like: | |
| $config['plugins'] = array('disablecsrf'); | |
| CSRF should now be disabled for login. | |
| */ |
| <?php | |
| //absolute path to wp-load.php, or relative to this script | |
| //e.g., ../wp-core/wp-load.php | |
| include( 'trunk/wp-load.php' ); | |
| //grab the WPDB database object, using WP's database | |
| //more info: http://codex.wordpress.org/Class_Reference/wpdb | |
| global $wpdb; |
| <?php | |
| // Load WordPress | |
| require_once 'path/to/www/wp-load.php'; | |
| require_once ABSPATH . '/wp-admin/includes/taxonomy.php'; | |
| // Set the timezone so times are calculated correctly | |
| date_default_timezone_set('Europe/London'); | |
| // Create post |