Skip to content

Instantly share code, notes, and snippets.

@xxxxlr
xxxxlr / install.sh
Created October 22, 2017 06:04 — forked from ziadoz/install.sh
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`
WITH
-- write the new values
n(ip,visits,clicks) AS (
VALUES ('192.168.1.1',2,12),
('192.168.1.2',6,18),
('192.168.1.3',3,4)
),
-- update existing rows
upsert AS (
UPDATE page_views o
@xxxxlr
xxxxlr / gist:c814a1ee2fb441c84df1da14e58c7ca8
Created December 20, 2017 00:45 — forked from mrtns/gist:78d15e3263b2f6a231fe
Upgrade Chrome from Command Line on Ubuntu
# Install
# via http://askubuntu.com/questions/510056/how-to-install-google-chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt-get update
sudo apt-get install google-chrome-stable
# Update
@xxxxlr
xxxxlr / install.sh
Created July 25, 2018 03:05 — forked from chuyik/install.sh
Bandwagon(搬瓦工) CentOS 7 安装 shadowsocks-libev 和 kcptun
######################
## shadowsocks-libev
######################
# install dependencies
yum install epel-release -y
yum install gcc gettext autoconf libtool automake make pcre-devel asciidoc xmlto udns-devel libev-devel -y
# install shadowsocks-libev
cd /etc/yum.repos.d/
@xxxxlr
xxxxlr / 99-android.rules
Created August 15, 2018 08:15 — forked from ktnr74/99-android.rules
Universal udev rules file to set Android device permissions
# do not forget to run 'sudo udevadm control --reload-rules' after editing this file
ACTION!="add", GOTO="android_usb_rules_end"
SUBSYSTEM!="usb", GOTO="android_usb_rules_end"
ENV{DEVTYPE}!="usb_device", GOTO="android_usb_rules_end"
ENV{ID_SERIAL_SHORT}=="", GOTO="android_empty_serial"
ENV{ID_SERIAL_SHORT}=="0000:*", GOTO="android_empty_serial"
ENV{ID_SERIAL_SHORT}=="0123456789ABCDEF", GOTO="android_empty_serial"