Skip to content

Instantly share code, notes, and snippets.

@chfw
chfw / gist:074bad40779cfd426de2ffd7f3cdc28b
Created May 11, 2017 11:29
sqlalchemy via maria db on fedora 22
go through the steps here: https://fedoraproject.org/wiki/MariaDB
sudo dnf install mariadb-devel
then pip install mysql-python
python -m sphinx.ext.intersphinx http://xlrd.readthedocs.io/en/latest/objects.inv > log
:func:`xlrd.open_workbook`
import webdriver from 'selenium-webdriver';
this.driver = new webdriver.Builder().forBrowser('chrome').build();
=>
var selenium_webdriver_1 = require("selenium-webdriver");
@chfw
chfw / gist:8c0ab53c974f2e81691bafbffc991a86
Created December 15, 2017 23:10
install apache superset on ubuntu 17.04 server edition
sudo apt-get update
sudo apt-get install liabssl-dev libsasl2-dev
then python setup.py install inside incubator-superset
https://github.com/angular/protractor/issues/4307
use node 7.10.0 -> browser.pause() works
c -> next
any other versions of Node, browser.pause() wont work
#{} would escape your json
!{} would not, but not clearly documented
create an instance in gcloud
you need java
sudo apt install openjdk-8-jre-headless
then following these commands
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
from tornado.websocket import WebSocketHandler
from tornado.web import Application, RequestHandler
from tornado.ioloop import IOLoop
HTML = """
<html>
<div id="messages"></div>
<script>
var ws = new WebSocket("ws://localhost:8888/websocket");
resolve: {
extensions: ['.js', '.jsx']
},
@chfw
chfw / gist:d11eb7bd8f478eede112c8e316ca3a7f
Created December 11, 2018 09:07
database replication using mariadb
https://www.tecmint.com/mariadb-master-slave-replication-on-centos-rhel-debian/
CHANGE MASTER TO MASTER_HOST='10.154.0.2' MASTER_USER='slave' MASTER_PASSWORD='SlavePassword' MASTER_PORT=3306 MASTER_LOG_FILE='mariadb-bin.000001' MASTER_LOG_POS=602 MASTER_CONNECT_RETRY=10;
MASTER_USE_GTID=current_pos is deprecated