Skip to content

Instantly share code, notes, and snippets.

View vietdien2005's full-sized avatar
🦉
there's something dark inside

Dam Viet vietdien2005

🦉
there's something dark inside
View GitHub Profile
@vietdien2005
vietdien2005 / install.md
Created December 31, 2017 01:34
install CPU Mining
  sudo apt-get install git libcurl4-openssl-dev build-essential libjansson-dev autotools-dev automake
  git clone https://github.com/hyc/cpuminer-multi
  cd cpuminer-multi
  ./autogen.sh
  CFLAGS="-march=native" ./configure
  sudo make
  sudo make install 
  sudo ./minerd -a cryptonight -o stratum+tcp://pool.minexmr.com:4444 -u <WALLET_ADDRESS_HERE> -p x -t 3
@vietdien2005
vietdien2005 / install.md
Last active December 30, 2017 06:56
install bfgminer with cpu mining on Ubuntu 16.04

Install

  sudo apt-get install bfgminer
  • Unfortunately the version was not up to date, and was not compiled for mining scrypt-based coins like Litecoin. Here is how I built BFGMiner with this support.

  • Install the dependencies:

  sudo apt-get install build-essential autoconf libtool libjansson-dev libcurl4-gnutls-dev libncurses5-dev libudev-dev libusb-1.0-0-dev yasm uthash-dev
@vietdien2005
vietdien2005 / system.conf
Created December 29, 2017 03:47
LEMP config monit
## Apache monitoring.
## Test the httpd service.
check process apache with pidfile /run/httpd/httpd.pid
group apache
start program = "/usr/bin/systemctl start httpd"
stop program = "/usr/bin/systemctl stop httpd"
restart program = "/usr/bin/systemctl restart httpd"
## Test port 80. Restart if the server is down.
if failed host localhost port 80 protocol http then restart
@vietdien2005
vietdien2005 / mkgit-centos6.sh
Created December 28, 2017 02:33 — forked from eyecatchup/mkgit-centos6.sh
Bash script to install the latest Git version on CentOS 6.x.
#!/usr/bin/env bash
# Install the latest version of git on CentOS 6.x
# Install Required Packages
sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
sudo yum install gcc perl-ExtUtils-MakeMaker
# Uninstall old Git RPM
sudo yum remove git
@vietdien2005
vietdien2005 / config.sh
Created October 7, 2017 10:07
Fix force gdm login screen to the primary monitor
sudo cp ~/.config/monitors.xml /var/lib/gdm3/.config/
@vietdien2005
vietdien2005 / stream.sh
Last active October 7, 2017 10:07
streaming with ffmpeg
VBR="2500k"
FPS="30"
QUAL="veryfast"
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2"
SOURCE="http://125.212.211.162:8080/live/super-sunday.m3u8"
SOURCEFB="https://video-hkg3-1.xx.fbcdn.net/hvideo-atn2/v/dash-md/267360413666075-854021.m4a"
KEY="agyz-6wy0-k429-8gqu"
#ffmpeg \
@vietdien2005
vietdien2005 / upgrade.md
Last active August 21, 2017 14:01
Upgrade Python 2.6 to Python 2.7 on Centos 6.6

Upgrade Python 2.6 to Python 2.7 on Centos 6.6

  sudo yum update # Update yum
  sudo yum install centos-release-scl # Install SCL 
  sudo yum install python27 # Install Python 2.7

To use it, you essentially spawn another shell (or script) while enabling the newer version of Python:

@vietdien2005
vietdien2005 / jenkins-theme-material.css
Last active August 15, 2017 02:28
jenkins-theme-material.css
@import url(https://fonts.googleapis.com/css?family=Roboto:400,700,500,300);@import url(https://fonts.googleapis.com/css?family=Roboto+Mono:400,700,500,300);.CodeMirror pre,body{line-height:20px!important}#header,.top-sticker-inner{box-shadow:0 1px 5px 0 rgba(0,0,0,.16),0 2px 10px 0 rgba(0,0,0,.12)}.bottom-sticker-edge,.task-link[href="/"]{display:none}.task-icon-link[href="/"]:hover,a#jenkins-home-link{opacity:1!important}#header .icon-help,.yuimenuitem-selected>a>img{filter:brightness(10000)}@keyframes a{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@keyframes b{0%,to{opacity:1}50%{opacity:0}}[src$="blue.png"]{background-image:url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDA5Njg4IiBkPSJNMTIgMkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptLTIgMTVsLTUtNSAxLjQxLTEuNDFMMTAgMTQuMTdsNy41OS03LjU5TDE5IDhsLTkgOXoiLz48L3N2Zz4=)}[src$="red.png"]{background-image:url(
@vietdien2005
vietdien2005 / install.sh
Created August 13, 2017 15:13 — forked from ziadoz/install.sh
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`
@vietdien2005
vietdien2005 / create-docker-tls.sh
Created June 1, 2017 02:47 — forked from Stono/create-docker-tls.sh
Creating and setting up Docker for TLS
#!/bin/bash
# This script will help you setup Docker for TLS authentication.
# Run it passing in the arguement for the FQDN of your docker server
#
# For example:
# ./create-docker-tls.sh myhost.docker.com
#
# The script will also create a profile.d (if it exists) entry
# which configures your docker client to use TLS
#