Skip to content

Instantly share code, notes, and snippets.

View tjlee's full-sized avatar
:octocat:

Vasilii Chernov tjlee

:octocat:
View GitHub Profile
@tjlee
tjlee / nodes.sql
Last active September 6, 2021 14:52
Nodes sample DDL
create type node_type as enum (
''
);
create table node (
node_id serial primary key not null,
network cidr not null,
mac macaddr,
ip_addr inet not null,
serial_number varchar(50),
Ho to set up SSL env
docker-compose up -d mysql80X
exec inside
find /var/lib/mysql -name '*.pem' -ls
cd /etc/mysql
require_secure_transport = ON
restart container
@tjlee
tjlee / copy_from_vertica.md
Last active December 24, 2018 13:43
COPY FROM VERTICA

Ips for Docker Toolbox.

  • docker-compose up -d vertica81 vertica91

  • Connect to Vertica81 with DG with dbadmin (no password)

  • Get gateway to create proper subnet: $docker inspect $(docker ps | grep vertica91 | awk '{print $1}') --format='{{range .NetworkSettings.Networks}}{{.Gateway}}{{end}}' ==> 172.18.0.1

  • Get ip for vertica 81:

use test
go
create schema authorization test
go
use test
go
sp_adduser 'test', 'test', null
go
grant create default to test
go
grant create table to test
go
use master
go
create database test
go
create login test with password test1234
go
exec sp_dboption test, 'abort tran on log full', true
go
exec sp_dboption test, 'allow nulls by default', true
go
@tjlee
tjlee / genymotionwithplay.txt
Created January 5, 2016 19:41 — forked from wbroek/genymotionwithplay.txt
Genymotion with Google Play Services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
@tjlee
tjlee / install-gradle-centos.sh
Created December 29, 2015 14:40 — forked from parzonka/install-gradle-centos.sh
Install gradle on redhat/centos linux
# installs to /opt/gradle
# existing versions are not overwritten/deleted
# seamless upgrades/downgrades
# $GRADLE_HOME points to latest *installed* (not released)
gradle_version=2.9
wget -N https://services.gradle.org/distributions/gradle-${gradle_version}-all.zip
sudo unzip -foq gradle-${gradle_version}-all.zip -d /opt/gradle
sudo ln -sfn gradle-${gradle_version} /opt/gradle/latest
sudo printf "export GRADLE_HOME=/opt/gradle/latest\nexport PATH=\$PATH:\$GRADLE_HOME/bin" > /etc/profile.d/gradle.sh
. /etc/profile.d/gradle.sh
@tjlee
tjlee / groovy-create-user.md
Created December 29, 2015 14:35 — forked from hayderimran7/groovy-create-user.md
Jenkins Groovy enable security and create a user in groovy script

This is a snippet that will create a new user in jenkins and if security has been disabled , it will enable it :)

import jenkins.model.*
import hudson.security.*

def instance = Jenkins.getInstance()

def hudsonRealm = new HudsonPrivateSecurityRealm(false)
hudsonRealm.createAccount("MyUSERNAME","MyPASSWORD")
instance.setSecurityRealm(hudsonRealm)
@tjlee
tjlee / selenium_ide_while_ext.js
Created December 26, 2015 18:06
Selenium IDE FF browser plugin extention for execution while statements
var gotoLabels= {};
var whileLabels = {};
Selenium.prototype.reset = function() {
this.initialiseLabels();
this.defaultTimeout = Selenium.DEFAULT_TIMEOUT;
this.browserbot.selectWindow("null");
this.browserbot.resetPopups();
}