Skip to content

Instantly share code, notes, and snippets.

View toanalien's full-sized avatar
🎯
Focusing

Thiên Toán toanalien

🎯
Focusing
View GitHub Profile
@toanalien
toanalien / BATBTC.csv
Created May 21, 2020 05:54
Fetched from Binance
Date Open High Low Close Volume
2020-05-19 09:00:00 2.11e-05 2.118e-05 2.106e-05 2.113e-05 324959.0
2020-05-19 10:00:00 2.114e-05 2.119e-05 2.107e-05 2.118e-05 400205.0
2020-05-19 11:00:00 2.119e-05 2.119e-05 2.094e-05 2.11e-05 1004006.0
2020-05-19 12:00:00 2.114e-05 2.133e-05 2.109e-05 2.121e-05 735355.0
2020-05-19 13:00:00 2.121e-05 2.125e-05 2.112e-05 2.116e-05 225666.0
2020-05-19 14:00:00 2.118e-05 2.122e-05 2.102e-05 2.111e-05 200795.0
2020-05-19 15:00:00 2.112e-05 2.132e-05 2.103e-05 2.13e-05 491363.0
2020-05-19 16:00:00 2.128e-05 2.132e-05 2.11e-05 2.124e-05 418583.0
2020-05-19 17:00:00 2.124e-05 2.136e-05 2.122e-05 2.127e-05 420179.0
#!/bin/bash
sudo apt-get update
sudo apt-get install xrdp -y
sudo apt-get install mate-core mate-desktop-environment mate-notification-daemon -y
sudo sed -i.bak '/fi/a #xrdp multiple users configuration \n mate-session \n' /etc/xrdp/startwm.sh
sudo ufw allow 3389/tcp
sudo /etc/init.d/xrdp restart
#!/bin/bash
CNTX={users|orgs}; NAME={username|orgname}; PAGE=1
curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" |
grep -e 'git_url*' |
cut -d \" -f 4 |
xargs -L1 git clone
@toanalien
toanalien / Vagrantfile
Created May 5, 2020 04:15
centos with redis
$install_redis = <<-'SCRIPT'
sudo yum update -y
sudo yum install epel-release yum-utils -y
sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm -y
sudo yum-config-manager --enable remi -y
sudo yum install redis -y
sudo systemctl status redis
SCRIPT
Vagrant.configure("2") do |config|
@toanalien
toanalien / docker-compose.yml
Created March 21, 2020 02:37 — forked from cboettig/docker-compose.yml
debugging NGINX configuration for Jupyter
jupyter:
image: jupyter/datascience-notebook
environment:
- PASSWORD=${PASSWORD}
nginx:
image: nginx
links:
- jupyter
@toanalien
toanalien / change-mirror.sh
Last active February 28, 2020 07:51
Change mirror ubuntu
#!/bin/bash
#http://mirrors.ubuntu.com/mirrors.txt
#sudo sed -i 's%us.archive.ubuntu.com%mirror.ehost.vn%' /etc/apt/sources.list
sudo sed -i 's%us.archive.ubuntu.com%mirror.clearsky.vn%' /etc/apt/sources.list
@toanalien
toanalien / docker-compose.yml
Created December 1, 2016 06:49
Docker compose for cAdvisor, InfluxDB, Grafana
version: '2'
services:
influxdbData:
image: busybox
volumes:
- ./data/influxdb:/data
influxdb:
image: tutum/influxdb:0.9
@toanalien
toanalien / appsScript_ListFilesFolders_ver.2.js
Created October 12, 2019 18:23 — forked from mesgarpour/appsScript_ListFilesFolders_ver.2.js
[Google Apps Script] List all files & folders in a Google Drive folder, & write into a speadsheet
/*
* Copyright 2017 Mohsen Mesgarpour
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
# CentOS-Ceph-Hammer.repo
#
# Please see http://wiki.centos.org/SpecialInterestGroup/Storage for more
# information
[centos-ceph-hammer]
name=CentOS-$releasever - Ceph Hammer
baseurl=http://mirrors.aliyun.com/ceph/rpm-hammer/el7/x86_64/
gpgcheck=1
enabled=1
@toanalien
toanalien / admin-gogs.sh
Created June 14, 2019 09:03
create admin gogs
#!/bin/bash
docker-compose exec --user git web bash
export USER=git
cd /app/gogs
./gogs admin create-user --name tmpuser --password tmppassword --admin --email email@example.com