Skip to content

Instantly share code, notes, and snippets.

@ikegami-yukino
ikegami-yukino / google_login.py
Created June 12, 2015 09:26
Automatically Google login by selenium
mail_address = ''
password = ''
from selenium import webdriver
UA = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0'
PHANTOMJS_ARG = {'phantomjs.page.settings.userAgent': UA}
driver = webdriver.PhantomJS(desired_capabilities=PHANTOMJS_ARG)
url = 'https://www.google.com/accounts/Login?hl=ja&continue=http://www.google.co.jp/'
@ochronus
ochronus / commands.sh
Last active November 21, 2023 11:28
CPU and disk benchmarks
# install sysbench
$ apt-get install sysbench
# CPU benchmark, 1 thread
$ sysbench --test=cpu --cpu-max-prime=20000 run
# CPU benchmark, 64 threads
$ sysbench --test=cpu --cpu-max-prime=20000 --num-threads=64 run
# Disk benchmark, random read. See .fio files in this gist
@skarfacegc
skarfacegc / slate.conf
Last active December 10, 2015 01:58
Slate stuff
config defaultToCurrentScreen true
# Shows app icons and background apps, spreads icons in the same place.
config windowHintsShowIcons true
config windowHintsIconAlpha 0.5
config windowHintsIgnoreHiddenWindows false
config windowHintsSpread true
config secondsBetweenRepeat 0.1
# Development layout
@moklett
moklett / openconnect.md
Created July 24, 2012 15:21
OpenConnect VPN on Mac OS X

Unfortunately, the Cisco AnyConnect client for Mac conflicts with Pow. And by "conflicts", I mean it causes a grey-screen-of-death kernel panic anytime you connect to the VPN and Pow is installed.

As an alternative, there is OpenConnect, a command-line client for Cisco's AnyConnect SSL VPN.

Here's how to get it set up on Mac OS X:

  1. OpenConnect can be installed via homebrew:

     brew update
    

brew install openconnect