Skip to content

Instantly share code, notes, and snippets.

xxxxlr

Block or report user

Report or block xxxxlr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@xxxxlr
xxxxlr / 99-android.rules
Created Aug 15, 2018 — forked from ktnr74/99-android.rules
Universal udev rules file to set Android device permissions
View 99-android.rules
# 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"
@xxxxlr
xxxxlr / install.sh
Created Jul 25, 2018 — forked from chuyik/install.sh
Bandwagon(搬瓦工) CentOS 7 安装 shadowsocks-libev 和 kcptun
View install.sh
######################
## 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 / gist:c814a1ee2fb441c84df1da14e58c7ca8
Created Dec 20, 2017 — forked from mrtns/gist:78d15e3263b2f6a231fe
Upgrade Chrome from Command Line on Ubuntu
View gist:c814a1ee2fb441c84df1da14e58c7ca8
# 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
View gist:b3ab61d2532072a79185deb75c35383b
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 / install.sh
Created Oct 22, 2017 — forked from ziadoz/install.sh
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
View install.sh
#!/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`
@xxxxlr
xxxxlr / install_elixir.md
Created Sep 11, 2017 — forked from rubencaro/install_elixir.md
Elixir installation guide
View install_elixir.md

Elixir installation guide

Version numbers should be the ones you want. Here I do it with the last ones available at the moment of writing.

The simplest way to install elixir is using your package manager. Sadly, at the time of writing only Fedora shows the intention to keep its packages up to date. There you can simply sudo dnf install erlang elixir and you are good to go.

Anyway, if you intend to work with several versions of erlang or elixir at the same time, or you are tied to a specific version, you will need to compile it yourself. Then asdf is your best friend.

@xxxxlr
xxxxlr / React-Native-WebView-Cookies.js
Created Jul 27, 2017 — forked from kanzitelli/React-Native-WebView-Cookies.js
React Native Trick: Get Cookies of WebView without using any native modules such as react-native-cookies. Might be helpful for getting JWT while making OAuth2 👽
View React-Native-WebView-Cookies.js
// @flow
import React, { Component } from 'react';
import {
WebView,
} from 'react-native';
class LoginScreen extends Component {
state = {
cookies : {},
@xxxxlr
xxxxlr / mocha-guide-to-testing.js
Created Apr 26, 2017 — forked from samwize/mocha-guide-to-testing.js
Explain Mocha's testing framework - describe(), it() and before()/etc hooks
View mocha-guide-to-testing.js
// # Mocha Guide to Testing
// Objective is to explain describe(), it(), and before()/etc hooks
// 1. `describe()` is merely for grouping, which you can nest as deep
// 2. `it()` is a test case
// 3. `before()`, `beforeEach()`, `after()`, `afterEach()` are hooks to run
// before/after first/each it() or describe().
//
// Which means, `before()` is run before first it()/describe()
@xxxxlr
xxxxlr / tmux_install.sh
Created Apr 4, 2017 — forked from mirskiy/tmux_install.sh
Install tmux 2.2 on Ubuntu 14.04 from source
View tmux_install.sh
sudo apt-get update
sudo apt-get install -y libevent-dev libncurses-dev make
wget https://github.com/tmux/tmux/releases/download/2.2/tmux-2.2.tar.gz
tar xvzf tmux-2.2.tar.gz
cd tmux-2.2/
./configure && make
sudo make install
@xxxxlr
xxxxlr / tmux_install.sh
Created Apr 4, 2017 — forked from mirskiy/tmux_install.sh
Install tmux 2.2 on Ubuntu 14.04 from source
View tmux_install.sh
sudo apt-get update
sudo apt-get install -y libevent-dev libncurses-dev make
wget https://github.com/tmux/tmux/releases/download/2.2/tmux-2.2.tar.gz
tar xvzf tmux-2.2.tar.gz
cd tmux-2.2/
./configure && make
sudo make install
You can’t perform that action at this time.