Skip to content

Instantly share code, notes, and snippets.

Avatar

Cuong Tran cuongtransc

View GitHub Profile
View setup-basic-desktop-dev.sh
#!/bin/bash
########################################
# Functions
########################################
function install_basic_tools() {
echo "Installing basic tools..."
sudo apt-get update -qq
sudo apt-get install -y byobu zsh vim
View keybase.md

Keybase proof

I hereby claim:

  • I am cuongtransc on github.
  • I am cuongtransc (https://keybase.io/cuongtransc) on keybase.
  • I have a public key ASDPUB86Y1HPF1xrhxR7PYJzjSbAMFy0wYpRdfy0oIUW-Qo

To claim this, I am signing this object:

View Dockerfile
#--------------------------------------
# Stage: Compile Apps
#--------------------------------------
FROM node:8.9
LABEL maintainer="cuongtransc@gmail.com"
ENV REFRESHED_AT 2018-02-26
WORKDIR /app
View byobu_cheatsheet.txt
Byobu is a suite of enhancements to tmux, as a command line
tool providing live system status, dynamic window management,
and some convenient keybindings:
F1 Used by X11
Shift-F1 Display this help
F2 Create a new window
Shift-F2 Create a horizontal split
Ctrl-F2 Create a vertical split
@cuongtransc
cuongtransc / Dockerfile
Last active Jul 16, 2019
Kubernetes CronJob: GitLab Backup
View Dockerfile
# Author: Cuong Tran
#
# Build: docker build -t cuongtransc/kubectl:1.9.1 .
# Run: docker run -it --rm cuongtransc/kubectl:1.9.1 sh
#
FROM roffe/kubectl:v1.9.1
COPY kube_config /root/.kube
View peco_git_alias.sh
#
# Edit file ~/.gitconfig, add to git alias
#
# Download peco: https://github.com/peco/peco
#
[alias]
logp = "!git log --oneline $@ | peco"
showp = "!git show `git log --oneline | peco | cut -d' ' -f1`"
showpfile = "!git show --name-only `git log --oneline | peco | cut -d' ' -f1`"
View peco_history.sh
#
# Download Peco: https://github.com/peco/peco
#
function peco-select-history() {
local tac
if which tac > /dev/null; then
tac="tac"
else
tac="tail -r"
fi
View feature_extraction_caffe_alexnet.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import caffe
import numpy as np
# References: https://prateekvjoshi.com/2016/04/26/how-to-extract-feature-vectors-from-deep-neural-networks-in-python-caffe/
# ---------------------------------
# Load Model
View 0_beautifulsoup.py
# 10_basic.py
# 15_make_soup.py
# 20_search.py
# 25_navigation.py
# 30_edit.py
# 40_encoding.py
# 50_parse_only_part.py
View bash-cheatsheet.md

Bash Cheat Sheet

Source: http://www.johnstowers.co.nz/blog/pages/bash-cheat-sheet

This file contains short tables of commonly used items in this shell. In most cases the information applies to both the Bourne shell (sh) and the newer bash shell.

Tests (for ifs and loops) are done with [ ] or with the test command.

Checking files