$ pip install click requests
$ python query_export.py --redash-url "https://app.redash.io/" --api-key ""
from sshtunnel import SSHTunnelForwarder | |
import pymysql | |
with SSHTunnelForwarder( | |
('ec2-52-202-194-76.public-ec2-instance.amazonaws.com'), | |
ssh_username="ec2-user", | |
ssh_pkey="~/ssh-tunnel-rds.pem", | |
remote_bind_address=('private-rds-instance.ckfkidfytpr4.us-east-1.rds.amazonaws.com', 3306) | |
) as tunnel: | |
print("****SSH Tunnel Established****") |
# tabc <profile name> do the profile change | |
function tabc() { | |
NAME=$1; if [ -z "$NAME" ]; then NAME="Default"; fi | |
# if you have trouble with this, change | |
# "Default" to the name of your default theme | |
echo -e "\033]50;SetProfile=$NAME\a" | |
} | |
# reset the terminal profile to Default when exit from the ssh session | |
function tab-reset() { |
root
user (sudo su
).nginx
in /opt/redash
.certs
and certs-data
./opt/redash/nginx/nginx.conf
and place the following in it: (replace example.redashapp.com
with your domain name)
upstream redash {
server redash:5000;
}
#!/usr/bin/ruby | |
require 'logger' | |
require 'pragmatic_tokenizer' | |
require 'unicode_utils' | |
class Serbilian | |
SINGLE_LETTER_WORDS = { | |
"à" => "a", | |
"ã" => "ɐ̃", | |
"â" => "ɐ̃", |
Install, build and debug a react native app in WSL2 (Windows Subsystem for Linux) and Ubuntu.
# Install MySQL | |
mysql_config_file="/etc/mysql/my.cnf" | |
echo "mysql-server mysql-server/root_password password secret" | sudo debconf-set-selections | |
echo "mysql-server mysql-server/root_password_again password secret" | sudo debconf-set-selections | |
apt-get -y install mysql-client mysql-server | |
sed -i "s/bind-address\s*=\s*127.0.0.1/bind-address = 0.0.0.0/" ${mysql_config_file} | |
usermod -d /var/lib/mysql/ mysql |
#!/bin/bash | |
# Install Quake 3: Arena on a mac | |
# Copyright (c) 2016 simonewebdesign | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
1 - Download the RDS certificates (root plus region-specific intermediate ones) bundle:
wget -O config/rds-combined-ca-bundle.pem https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem
2 - Add config/rds-combined-ca-bundle.pem
to the repository and redeploy to Heroku.
3 - Update the DATABASE_URL
env var:
Museomix is a short event where coders, designers, hackers, cultural and museum experts brainstorm on collections and museum installations. This document gives hints on setting up an electronic lab so attendees can benefit from real-world interactions.
Often, exhibits must sense their environment (is there light ? is there a visitor ? ...) or act on their environment (turn the light on ! make a sound ! ...).