Skip to content

Instantly share code, notes, and snippets.

View halink0803's full-sized avatar
🇻🇳
Busy running

Ha Link halink0803

🇻🇳
Busy running
View GitHub Profile
@halink0803
halink0803 / fix_onedrive.sh
Created November 1, 2018 03:33 — forked from drblue/fix_onedrive.sh
Fix OneDrive for Mac CPU usage
#!/bin/bash
find ~/Library/Group\ Containers/ -type d -name OfficeFileCache -exec rm -r {} +
@halink0803
halink0803 / Twelve_Go_Best_Practices.md
Created January 20, 2018 09:07 — forked from pzurek/Twelve_Go_Best_Practices.md
Twelve Go Best Practices
@halink0803
halink0803 / docker-cleanup-resources.md
Last active January 16, 2018 09:16 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@halink0803
halink0803 / ConvertVie.js
Created September 12, 2017 04:47 — forked from hu2di/ConvertVie.js
JavaScript: Chuyển tiếng Việt có dấu sang không dấu
function change_alias(alias) {
var str = alias;
str = str.toLowerCase();
str = str.replace(/à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ/g,"a");
str = str.replace(/è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ/g,"e");
str = str.replace(/ì|í|ị|ỉ|ĩ/g,"i");
str = str.replace(/ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ/g,"o");
str = str.replace(/ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ/g,"u");
str = str.replace(/ỳ|ý|ỵ|ỷ|ỹ/g,"y");
str = str.replace(/đ/g,"d");
@halink0803
halink0803 / keyrepeat.shell
Created April 4, 2016 02:32 — forked from kconragan/keyrepeat.shell
Enable key repeat in Apple Lion for Sublime Text in Vim mode
# Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key
# that enables you to choose a character from a menu of options. If you are on Lion
# try it by pressing and holding down 'e' in any app that uses the default NSTextField
# for input.
#
# It's a nice feature and continues the blending of Mac OS X and iOS features. However,
# it's a nightmare to deal with in Sublime Text if you're running Vintage (Vim) mode,
# as it means you cannot press and hold h/j/k/l to move through your file. You have
# to repeatedly press the keys to navigate.
@halink0803
halink0803 / gist:ea38445fd826a8c927f2
Created February 20, 2016 03:52 — forked from kitek/gist:1579117
NodeJS create md5 hash from string
var data = "do shash'owania";
var crypto = require('crypto');
crypto.createHash('md5').update(data).digest("hex");
@halink0803
halink0803 / README
Last active August 29, 2015 04:04 — forked from adilapapaya/README
Export Table Data to CSV using Javascript
Example code for exporting data in a table to a csv file.