Skip to content

Instantly share code, notes, and snippets.

Bùi Việt Thành giabao

Block or report user

Report or block giabao

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am giabao on github.
  • I am thanhbv (https://keybase.io/thanhbv) on keybase.
  • I have a public key ASB8AOdn8vYIKXo0s22E-X5K-HrHETYLe4kFziNcrXx8FAo

To claim this, I am signing this object:

View authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEA1vaL6SWIVHewr2EcHQvDCAzaOckQzDY5AvnJkSzj2IE7p9af7Rt5OZJa/bnuX24+tfIBT3x4FJZSnpILYDBtPr2CleNX4JRxt7RWcXytzNYJQyYfmoucTLgG1YUlJS9u9tzyZGJfBDCNFQ7dv+hUUHVNgfC0XPIKU1jBdcK7gkU=
View install-letsencrypt-in-jdk.sh
#!/bin/bash
# This script add letsencrypt certs to $JAVA_HOME/jre/lib/security/cacerts
# see https://community.letsencrypt.org/t/will-the-cross-root-cover-trust-by-the-default-list-in-the-jdk-jre/134/22
JAVA_HOME=${1-text}
[ $# -eq 0 ] && { echo "Usage: sudo $0 \$JAVA_HOME" ; exit 1; }
KEYSTORE=$JAVA_HOME/jre/lib/security/cacerts
alias keytool=$JAVA_HOME/bin/keytool
View crossdomain.conf
# Add this to your nginx.conf under http { }
server {
listen 843;
server_name localhost;
location / {
rewrite ^(.*)$ /crossdomain.xml;
}
View gist:9453227
2014-02-26 23:49:09,281 - [ERROR] - from akka.actor.OneForOneStrategy in cdn-akka.actor.default-dispatcher-5
Internal error
java.lang.IllegalStateException: Internal error
at sun.security.ssl.SSLEngineImpl.initHandshaker(SSLEngineImpl.java:451) ~[na:1.7.0_51]
at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:986) ~[na:1.7.0_51]
at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:884) ~[na:1.7.0_51]
at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:758) ~[na:1.7.0_51]
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624) ~[na:1.7.0_51]
at spray.io.SslTlsSupport$$anon$1$$anon$2$$anon$11.apply(SslTlsSupport.scala:287) ~[io.spray.spray-io-1.3-RC1.jar:na]
at spray.io.SslTlsSupport$$anon$1$$anon$2$PumpAction.apply(SslTlsSupport.scala:250) ~[io.spray.spray-io-1.3-RC1.jar:na]
@giabao
giabao / dl
Last active May 23, 2016
Use aria2c to download file1. add params (to speedup downloading): -s16 -x16 -k1M2. add --check-certificate=false3. simulate -o option of curl: dl -o /dir/file url will download file to /dir/file insteads of ./dir/file_______Install:1. apt-get install aria2c2. Download & chmod a+x /usr/bin/dl
View dl
alias dl='aria2c -x16 -s16 -k1M'
cd ~/Downloads/
dl --header="Cookie: oraclelicense=a" http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jdk-8u91-linux-x64.tar.gz
sudo mkdir -p /opt/java && cd /opt/java
sudo mv ~/Downloads/jdk-8u91-linux-x64.tar.gz .
sudo tar -xzf jdk-8u91-linux-x64.tar.gz
sudo ln -sfT jdk1.8.0_91 default
sudo rm -f jdk-8u91-linux-x64.tar.gz
update-alternatives --display java
@giabao
giabao / URLError_at_complete_facebook
Created Dec 31, 2013
Lỗi khi đăng ký tài khoản trên http://edx.dtu.vn:8001 qua facebook
View URLError_at_complete_facebook
<!DOCTYPE html>
<!-- saved from url=(0461)http://edx.dtu.vn:8001/complete/facebook/?redirect_state=RjeiBi9CnWDVFOGxS54cyIO2E8FR8TDM&code=AQAWcF5IFkQl-OVcyyLeGgfDEv7zcV4bW98Lm6VR_16Q-S8vczhrcWPR1Xx9nizcWXalVXyrncjk6HOYNVgzSuJfyZwk1DzxhdeHwFTdclEmF8XksE3U9X9LFOVpe3h6ZeGlODIqVPMHvpmjt2EMTPSe0P3GDY4XDDW5a4sZvgRGmImL2p8mqSFwaHeppOwlRVLzKwtJ0ZreVimsisizRpXpu4qj17UESNHaNaxcn5kwfX8K_FemKOplcNs-dNVg8awUvKnd9BV4TYyUhHanLXRo5_VGCUNSg0XUoPCPj-s-3NBSRzJJ2tKzpbpXawHvyL0&state=RjeiBi9CnWDVFOGxS54cyIO2E8FR8TDM#_=_ -->
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="robots" content="NONE,NOARCHIVE">
<title>URLError at /complete/facebook/</title>
<style type="text/css">
html * { padding:0; margin:0; }
body * { padding:10px 20px; }
body * * { padding:0; }
View script.js
var fs = require('fs');
var http = require('http');
var ProgressBar = require('progress');
var Handlebars = require('handlebars');
var lineSep = '\r\n';
var typeSep = /\|+|\/|\sor\s|\:/g;
var invalidNameRegEx = /\.|\:|\-|\[|\]|\(\)/g;
var typeCleanupRegex = /\{|\}.*/g;
var indentation = ' ';
You can’t perform that action at this time.