Skip to content

Instantly share code, notes, and snippets.

View AlbaHoo's full-sized avatar
🌴
On vacation

Alba Hoo AlbaHoo

🌴
On vacation
View GitHub Profile

API workthough

  1. Open a browser

    # start an instance of firefox with selenium-webdriver
    driver = Selenium::WebDriver.for :firefox
    # :chrome -> chrome
    # :ie     -> iexplore
    
  • Go to a specified URL
@AlbaHoo
AlbaHoo / imagemagick.bash
Created August 3, 2018 03:53 — forked from bensie/imagemagick.bash
ImageMagick Static Binaries for AWS Lambda
#!/usr/bin/env bash
# Must be run on an Amazon Linux AMI that matches AWS Lambda's runtime
# As of Nov 23, 2015, this is Amazon Linux AMI 2014.09.2 x86_64 (ami-0c682c64)
#
# Lambda includes ImageMagick 6.7.8-9 preinstalled, so you need to prepend PATH
# with the folder containing these binaries in your Lambda function to ensure
# these newer binaries are used.
sudo yum -y install libpng-devel libjpeg-devel libtiff-devel gcc
@AlbaHoo
AlbaHoo / update-dnsmasq-from-gfwlist.py
Created January 10, 2018 02:41 — forked from rambolee/update-dnsmasq-from-gfwlist.py
升级 小米路由器3 可以ssh 可以 Shadowsocks [Tags]: 小米路由, 小米路由3, 小米路由器, 小米路由器3, ssh, shadowsocks
#!/usr/bin/env python
#coding=utf-8
#
# Generate a list of dnsmasq rules with ipset for gfwlist
#
# Copyright (C) 2014 http://www.shuyz.com
# Ref https://code.google.com/p/autoproxy-gfwlist/wiki/Rules
import urllib2
import re
@AlbaHoo
AlbaHoo / SSL-Heroku.md
Created October 10, 2016 02:52
Update your SSL Certificate on Heroku with GoDaddy

#Update SSL certificate on Heroku

##Generate private key To generate your private key you need to have Homebrew and OpenSSL installed on your mac.

First install Homebrew.

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Then, install OpenSSL.

@AlbaHoo
AlbaHoo / gist:f7fd945f5cc70d2e030e1165ca79c355
Created June 20, 2016 07:19
Everything you can override in a refinerycms project with refinerycms-blog
When starting a project that includes refinerycms-blog:
$ rake refinery:override view=refinery/pages/*
$ rake refinery:override view=layouts/*
$ rake refinery:override view=refinery/blog/shared/*
$ rake refinery:override view=refinery/blog/posts/*
$ rake refinery:override view=refinery/*
$ rake refinery:override controller=refinery/blog/*
$ rake refinery:override controller=refinery/*