Skip to content

Instantly share code, notes, and snippets.

@huynle
huynle / ideavimrc
Last active December 6, 2017 01:01
ideavimrc
" https://gist.github.com/zchee/9c78f91cc5ad771c1f5d
" :actionlist will show all the actions/test
let mapleader = ' '
set surround
set scrolloff=3
set ignorecase smartcase
set showmode
set history=1000
@huynle
huynle / cvimrc
Last active February 15, 2020 13:47
cvimrc Chrome extension
set autoupdategist
set noautofocus
set nocncpcompletion
set smoothscroll
set hud
set noregex
set noinsertmappings
set typelinkhints
set defaultnewtabpage
let scrollduration = 10
Function RegexExtract(ByVal text As String, _
ByVal extract_what As String, _
Optional separator As String = ", ") As String
Dim allMatches As Object
Dim RE As Object
Set RE = CreateObject("vbscript.regexp")
Dim i As Long, j As Long
Dim result As String
@huynle
huynle / dabble_golang.go
Last active May 4, 2017 18:11
Initial dabbling with Golang
package main
// or you can do a single line import `import "fmt"`
import {
"fmt"
"encoding/json"
"net/http"
"math/rand"
"time"
}
@huynle
huynle / github.css
Created March 28, 2017 05:50 — forked from theconektd/github.css
Github Markdown CSS - for Markdown Editor Preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains the computed version number.
# This file is released into the public domain. Generated by
# versioneer-0.15+dev (https://github.com/warner/python-versioneer)
@huynle
huynle / hc06config.ino
Created September 9, 2016 03:04 — forked from racerxdl/hc06config.ino
HC-06 Module Configurator - Arduino Code
/*
HC-06 Module Configurator
This Arduino Code Configures the Baudrate, name and PIN to a HC-06 Bluetooth module on Serial port 0
By: Lucas Teske
*/
#define BAUDRATE 115200 // Valid values: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.
@huynle
huynle / bridge.py
Created February 29, 2016 18:07 — forked from pazdera/bridge.py
Example of `bridge' design pattern in Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Example of `bridge' design pattern
# This code is part of http://wp.me/p1Fz60-8y
# Copyright (C) 2011 Radek Pazdera
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
@huynle
huynle / object_pool.py
Created February 29, 2016 18:07 — forked from pazdera/object_pool.py
Example of `object pool' design pattern in Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Example of `object pool' design pattern
# Copyright (C) 2011 Radek Pazdera
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@huynle
huynle / gist:f41850be17a935a6efc9
Created February 29, 2016 18:07 — forked from pazdera/gist:1098129
Singleton example in Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Example of Singleton design pattern
# Copyright (C) 2011 Radek Pazdera
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.