A stored procedure that saves (insert/update) a URL, then returns the id for the record.
Works in Go v1.11.6+
and MySQL 5.7+
.
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE SaveUrl(
IN p_url varchar(8200),
IN p_title text
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
A stored procedure that saves (insert/update) a URL, then returns the id for the record.
Works in Go v1.11.6+
and MySQL 5.7+
.
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE SaveUrl(
IN p_url varchar(8200),
IN p_title text
package main | |
import ( | |
"fmt" | |
"io" | |
"os" | |
) | |
var path = "/Users/novalagung/Documents/temp/test.txt" |
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
// Name of the struct tag used in examples | |
const tagName = "validate" |
docker network create etcd --subnet 172.19.0.0/16 | |
docker run -d --name etcd0 --network etcd --ip 172.19.1.10 quay.io/coreos/etcd etcd \ | |
-name etcd0 \ | |
-advertise-client-urls http://172.19.1.10:2379,http://172.19.1.10:4001 \ | |
-listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \ | |
-initial-advertise-peer-urls http://172.19.1.10:2380 \ | |
-listen-peer-urls http://0.0.0.0:2380 \ | |
-initial-cluster-token etcd-cluster-1 \ | |
-initial-cluster etcd0=http://172.19.1.10:2380,etcd1=http://172.19.1.11:2380,etcd2=http://172.19.1.12:2380 \ |
:<<HAHA | |
[root@ip-10-3-10-20 data]# a=$(redis-cli -h 10.3.8.194 -p 6379 scan 294912) | |
[root@ip-10-3-10-20 data]# echo $a | |
3047424 6ac9551b504e9411f1e91ad6c933d72c_AQ_0 b61378029c19176ed003b5f1cf89f369_2_GM_0 52a252487027566c6b3e493c105f89a1_AQ_0 399728d38da6563cf3f1dc3959b27e47_NG_0 825c3ba283b7a91586ba8aa462523b73_1_GM_0 76136ad4c3cda6c5e71275ec4a71f6c3_NG_0 60382f172ea6b97e073f997a74d0d2cc_7_GM_0 d909f605055688396031fd1728c863aa_NG_0 ea4ba3285737fe7901fc6fbb1e5b3819_5_GM_0 53688e0be50bf825d190e261ada1f84d_4_GM_0 | |
HAHA | |
#!/bin/sh | |
[ "$#" -eq 1 ] || { echo "ERROR:1 argument required, $# provided"; exit 1; } | |
cursor=-1 |
http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6 | |
# rpm | |
wget --no-cookies \ | |
--no-check-certificate \ | |
--header "Cookie: oraclelicense=accept-securebackup-cookie" \ | |
"http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm" \ | |
-O jdk-7-linux-x64.rpm | |
# ubuntu |