Skip to content

Instantly share code, notes, and snippets.

@alancwoo
alancwoo / docker-compose.yml
Created August 22, 2019 06:45
Simple wordpress docker
version: '3'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
<html lang="en"><head>
<title>Anthropocene Curriculum</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1.0, user-scalable=no">
<meta property="og:image" content="https://api.anthropocene-curriculum.org/api/v1/img/pages/2728/seminar_01_vis_up01.png">
<meta property="og:title" content="Anthropocene Curriculum">
<script type="text/javascript" async="" defer="" src="//piwik.kbb.eu/piwik/piwik.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-shim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-sham.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/json3/3.3.2/json3.min.js"></script>
@alancwoo
alancwoo / travel_dates.py
Created March 13, 2019 09:17
Print travel dates from Google Calendar export
#!/usr/bin/python3
""" Travel Calendar Parser
Export ics from Google Calendar and pass filename as argument
pip3 install ics
python3 travel_dates.py input_file.ics
"""
import sys
from ics import Calendar

Keybase proof

I hereby claim:

  • I am alancwoo on github.
  • I am alanwoo (https://keybase.io/alanwoo) on keybase.
  • I have a public key ASBWH3e7kz2-Ul6-fQ1Pom8AeUxYUG7wulF7vsojsxZh1Qo

To claim this, I am signing this object:

@alancwoo
alancwoo / geocoder.py
Last active March 9, 2016 07:36
Simple python script for retrieving longitude and latitude from Google Location Geocoding API
# geocoder.py
#
# requires googlemaps python package:
#
# 1. pip install googlemaps
# 2. get and set your Api Key: https://developers.google.com/api-client-library/python/guide/aaa_apikeys#introduction
# 3. run with a single search or multiple
#
# geocoder.py 'Toronto, Canada'
# geocoder.py 'Toronto, Canada' 'Paris, France'
/*! jQuery UI - v1.10.3 - 2013-05-03
* http://jqueryui.com
* Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css, jquery.ui.theme.css
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
/* Layout helpers
----------------------------------*/
.ui-helper-hidden {
display: none;
}
.ui-helper-hidden-accessible {
/*! jQuery UI - v1.10.3 - 2013-05-03
* http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
(function( $, undefined ) {
var uuid = 0,
runiq
@alancwoo
alancwoo / .gitignore
Created October 16, 2012 18:15 — forked from redoPop/.gitignore
Template .gitignore file for WordPress projects
.DS_Store
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
@alancwoo
alancwoo / gist:3737976
Created September 17, 2012 15:23
SASS Build - St2 & RVM
/Users/---/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find sass (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4] (Gem::LoadError
@alancwoo
alancwoo / gist:2424868
Created April 19, 2012 23:39
brew install -v mysql error
➜ ~_svn brew -v install mysql
Homebrew 0.9
==> Downloading http://downloads.mysql.com/archives/mysql-5.5/mysql-5.5.20.tar.gz
Already downloaded: /Library/Caches/Homebrew/mysql-5.5.20.tar.gz
/usr/bin/tar xf /Library/Caches/Homebrew/mysql-5.5.20.tar.gz
==> Patching
/usr/bin/patch -f -p1 -i 000-homebrew.diff
patching file scripts/mysql_config.sh
==> cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/mysql/5.5.20 -DMYSQL_DATADIR=/usr/local/var/mysql -DINSTALL_MANDIR=/usr/local/Cellar/mysql/5.5.20/share/man -DINSTALL_DOCDIR=/usr/local/Cellar/mysql/5.5.20/share/doc/mysql -DINSTALL_INFODIR=/usr/local/Cellar/mysql/5.5.20/share/info -DINSTALL_MYSQLSHAREDIR=share/mysql -DWITH_SSL=yes -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DSYSCONFDIR=/usr/local/etc -DWITH_UNIT_TESTS=OFF -DWITH_READLINE=yes
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/mysql/5.5.20 -DMYSQL_DATADIR=/usr/local/var/mysql -DINSTALL_MANDIR=/usr/local/Cellar/mysql/5.5.20/share/man -DINSTALL_DOCDIR=/usr/local/Cellar/mysql/5.5.20/share/d