wget https://storage.googleapis.com/golang/go1.7.linux-armv6l.tar.gz
tar -C /usr/local -xzf go1.7.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "crypto/tls" | |
| "crypto/x509" | |
| "fmt" | |
| "io" | |
| "log" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Connect to Database | |
| psql -U username database | |
| Unix account login using local authentication | |
| psql database | |
| 2. List Database | |
| \l | |
| 3. List Tables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Date; | |
| import javax.persistence.Column; | |
| import javax.persistence.Entity; | |
| import javax.persistence.EntityListeners; | |
| import javax.persistence.GeneratedValue; | |
| import javax.persistence.Id; | |
| import javax.persistence.Table; | |
| import javax.persistence.Temporal; | |
| import javax.persistence.TemporalType; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| UTC to Date | |
| ==== | |
| LocalDateTime ldt = LocalDateTime.now(Clock.systemUTC()); | |
| Instant instant = ldt.toInstant(ZoneOffset.UTC); | |
| Date now = Date.from(instant); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Show running docker containers | |
| docker ps | |
| #Remove all docker images | |
| docker stop $(docker ps -a -q) | |
| docker rm $(docker ps -a -q) | |
| #Delete a docker image | |
| docker rmi <image_id> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| apt-get -y install git bc | |
| git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt | |
| mkdir /etc/letsencrypt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #title :wildfly-install.sh | |
| #description :The script to install Wildfly 10.x | |
| #more :http://sukharevd.net/wildfly-8-installation.html | |
| #author :Dmitriy Sukharev | |
| #date :2016-06-18T02:45-0700 | |
| #usage :/bin/bash wildfly-install.sh | |
| #tested-version1 :10.0.0.CR3 | |
| #tested-distros1 :Ubuntu 15.10; Debian 7,8; CentOS 7; Fedora 22 | |
| #tested-version2 :10.0.0.Final |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| COLLECT - Gathers data into a List | |
| ======================================== | |
| match (a {name:"Daniel"}), (b {name:"Jerry"}) | |
| with a,b | |
| match s = shortestPath(a-[]-b) | |
| unwind nodes(s) as n | |
| with collect(n) as m | |
| return head(m) |