Skip to content

Instantly share code, notes, and snippets.

View vtvh's full-sized avatar

Việt Hải vtvh

View GitHub Profile

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:

@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
@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 / 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 / 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
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="AIDA64 v6.70.6000">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-8859-1">
<STYLE>
#reportmenu > ul{
list-style: none;
margin: 0;
padding: 0;
@vtvh
vtvh / gist:c44d9e4c0911d86d1451e0967078f158
Created August 4, 2023 05:06
vim masterclass, gui vinh
magnet:?xt=urn:btih:3e78869d9886e3cefc49f0dcb8ce6f9a60581902&dn=Vim%20Masterclass&tr=udp%3a%2f%2ftracker.leechers-paradise.org%3a6969&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80&tr=udp%3a%2f%2fopen.demonii.com%3a1337&tr=udp%3a%2f%2ftracker.coppersurfer.tk%3a6969&tr=udp%3a%2f%2fexodus.desync.com%3a6969
@vtvh
vtvh / sachC.txt
Created August 8, 2023 14:09
Sach C | C ebooks
Effective C: An Introduction to Professional C Programming
SHOP: https://www.amazon.com/Effective-Introduction-Professional-Robert-Seacord/dp/1718501048/ref=sr_1_3?crid=3FAAQ54MKOZ3K&keywords=c+programming&qid=1691502767&sprefix=c+progra%2Caps%2C612&sr=8-3
PDF: http://libgen.rs/search.php?req=Effective+C%3A+An+Introduction+to+Professional+C+Programming&lg_topic=libgen&open=0&view=simple&res=25&phrase=1&column=def
C Programming Language, 2nd Edition
SHOP: https://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628/ref=sr_1_5?crid=3FAAQ54MKOZ3K&keywords=c+programming&qid=1691503339&sprefix=c+progra%2Caps%2C612&sr=8-5
PDF: http://libgen.rs/search.php?req=C+Programming+Language%2C+2nd+Edition&open=0&res=25&view=simple&phrase=1&column=def
// De Thi 1
// 15.08.2023
#include <stdio.h>
#include <stdlib.h>
void doQuestionR1()
{
int n, evenDivisor = 0;
printf("Input an integer: ");