Skip to content

Instantly share code, notes, and snippets.

View vtvh's full-sized avatar

Việt Hải vtvh

View GitHub Profile
lap-samsung
description: Laptop
product: 350U2A/350U2B/300U1A/351U2A/351U2B/301U1A (To be filled by O.E.M.)
vendor: SAMSUNG ELECTRONICS CO., LTD.
version: 07PY
serial: HHSQ93TB800291
width: 64 bits
capabilities: smbios-2.7 dmi-2.7 smp vsyscall32
configuration: boot=normal chassis=laptop family=To be filled by O.E.M. sku=To be filled by O.E.M. uuid=B46B5BB6-82CD-E011-BBF8-6B99E97687C7
*-core
@vtvh
vtvh / create-ssh-key.sh
Last active November 24, 2020 11:16
Create ssh key, copy to clipboard, add config. Usage: create-ssh-key <keyname> <hostname> <username> <port if not 22>
create-ssh-key() {
if [ "$#" -eq 0 ]; then
cat <<EOF
Create ssh key, copy to clipboard, add config.
Usage:
create-ssh-key <keyname> <hostname> <username> <port if not 22>
EOF
return 1
@vtvh
vtvh / dropbox_youtube_dl.sh
Created October 20, 2020 04:21 — forked from danog/dropbox_youtube_dl.sh
Script to download videos from YouTube using Dropbox and IFTTT automation (IFTTT recipe: https://ifttt.com/recipes/277403-download-every-youtube-video-you-add-to-your-watch-later-playlist-automatically)
#!/bin/bash
### Original script by Geoffeg, modified by Roblight and later by me (alias me='alias Danog='Daniil Gentili'')
### How to install this script:
### wget https://gist.githubusercontent.com/danog/f86bf3113e1644b4d5d9/raw/dropbox_youtube_dl.sh -O ~/dropbox_youtube_dl.sh && chmod 755 ~/dropbox_youtube_dl.sh && ~/dropbox_youtube_dl.sh --install
###
### IFTTT Recipe URL: https://ifttt.com/recipes/277403-download-every-youtube-video-you-add-to-your-watch-later-playlist-automatically
if [ "$1" = "--install" ]; then
if [ -f /usr/local/bin/youtube-dl ]; then echo "Youtube-dl already installed."; else echo "Installing youtube-dl..."; sudo curl https://yt-dl.org/downloads/2015.04.03/youtube-dl -o /usr/local/bin/youtube-dl && sudo chmod a+x /usr/local/bin/youtube-dl && echo "YouTube-dl installed successfully." || echo "Couldn't install YouTube-dl."; fi
@vtvh
vtvh / -install-wsl-devenv.md
Last active October 20, 2020 04:19 — forked from leodutra/-setup-windows-wsl-devenv.md
Installing Windows Subsystem for Linux 2, Hyper, ZSH and VSCode extensions

Installing Windows Subsystem for Linux 2, Hyper, ZSH, Node.js and VSCode extensions

Preview

Requirements

Steps

@vtvh
vtvh / print256colours.sh
Created October 5, 2020 11:36 — forked from HaleTom/print256colours.sh
Print a 256-colour test pattern in the terminal
#!/bin/bash
# Tom Hale, 2016. MIT Licence.
# Print out 256 colours, with each number printed in its corresponding colour
# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163
set -eu # Fail on errors or undeclared variables
printable_colours=256

Keybase proof

I hereby claim:

  • I am vtvh on github.
  • I am vtvh (https://keybase.io/vtvh) on keybase.
  • I have a public key ASDh8wkuNMvzPNM8zmWCLPYkRyppECJ0VI_h1ifj0B-AQwo

To claim this, I am signing this object: