Skip to content

Instantly share code, notes, and snippets.

View hiepph's full-sized avatar

Hiep Pham hiepph

View GitHub Profile
@hiepph
hiepph / pacaur_install.sh
Created March 5, 2017 18:52 — forked from tadly/pacaur_install.sh
A simple shell script to quickly / easily install "pacaur" on archlinux
#!/bin/sh
# If you are new to arch, I encourage you to at least read and understand what
# this script does befor blindley running it.
# That's why I didn't make a one-liner out of it so you have an easier time
# reading and understanding it :)
#
# This scripts purpose is purly to save you a few seconds on your new installation.
#
# Enjoy your time on an awesome system. Arch FTW!
@hiepph
hiepph / gist:6902777f5473ad35ba4dc549b23080f6
Created December 23, 2018 15:05 — forked from anildigital/gist:862675ec1b7bccabc311
Remove dangling docker images
docker rmi $(docker images -q -f dangling=true)
@hiepph
hiepph / gist:63123149340d7a7c137e5349edcfc7ab
Created December 25, 2018 15:23 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@hiepph
hiepph / install_basemap_commands
Created January 30, 2019 14:56 — forked from junzis/install_basemap_commands
install basemap quickly on ubuntu
sudo apt-get install libgeos-3.X.X
sudo apt-get install libgeos-dev
pip install --user https://github.com/matplotlib/basemap/archive/master.zip
@hiepph
hiepph / manjaro-avell-g1513.md
Created February 4, 2019 08:57 — forked from mauri870/manjaro-avell-g1513.md
Installation of Manjaro 17 and nvidia/bumblebee drivers on Avell G1513

After a weekend of research, stress and pain I finally figure out how to install manjaro 17 and configure the nvidia/bumblebee drivers on my avell laptop

Here's my notebook specs:

$ inxi -MGCNA

Machine:   Device: laptop System: Avell High Performance product: 1513
           Mobo: N/A model: N/A v: 0.1 UEFI: American Megatrends v: N.1.02 date: 09/28/2016
Battery    BAT0: charge: 44.0 Wh 100.0% condition: 44.0/44.0 Wh (100%)
@hiepph
hiepph / tmux-cheats.md
Created March 19, 2019 10:27 — forked from Starefossen/tmux-cheats.md
My personal tmux cheat sheet for working with sessions, windows, and panes. `NB` I have remapped the command prefix to `ctrl` + `a`.

Sessions

New Session

  • tmux new [-s name] [cmd] (:new) - new session

Switch Session

  • tmux ls (:ls) - list sessions
  • tmux switch [-t name] (:switch) - switches to an existing session
@hiepph
hiepph / gdrive_download
Created November 5, 2019 07:40 — forked from darencard/gdrive_download
Script to download files from Google Drive using Bash
#!/usr/bin/env bash
# gdrive_download
#
# script to download Google Drive files from command line
# not guaranteed to work indefinitely
# taken from Stack Overflow answer:
# http://stackoverflow.com/a/38937732/7002068
gURL=$1
@hiepph
hiepph / resize_and_pad_image_to_square
Created November 13, 2019 07:32 — forked from jdhao/resize_and_pad_image_to_square
this script will resize and pad an image to desired square size and keep its aspect ratio unchanged. Before running the script, please change the size and image path to valid value.
from PIL import Image, ImageOps
import cv2
desired_size = 368
im_pth = "/home/jdhao/test.jpg"
# im = Image.open(im_pth)
# old_size = im.size # old_size[0] is in (width, height) format
# ratio = float(desired_size)/max(old_size)