Skip to content

Instantly share code, notes, and snippets.

liudonghua liudonghua123

Block or report user

Report or block liudonghua123

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@liudonghua123
liudonghua123 / subl.reg
Created Jun 1, 2019
add context menu of sublime text 3
View subl.reg
Windows Registry Editor Version 5.00
; show in context menu when right click all kinds files
[HKEY_CLASSES_ROOT\*\shell\Sublime]
@="Open with Sublime Text 3"
"Icon"="C:\\Program Files\\Sublime Text 3\\sublime_text.exe,0"
[HKEY_CLASSES_ROOT\*\shell\Sublime\command]
@="\"C:\\Program Files\\Sublime Text 3\\sublime_text.exe\" \"%1\""
; show in context menu when right click empty area of explorer
@liudonghua123
liudonghua123 / simple-soap.js
Created May 31, 2019
A simple node app for soap operation demonstration
View simple-soap.js
const getCircularReplacer = () => {
const seen = new WeakSet();
return (key, value) => {
if (typeof value === "object" && value !== null) {
if (seen.has(value)) {
return;
}
seen.add(value);
}
@liudonghua123
liudonghua123 / main.py
Last active Jan 10, 2019
process xlsx with template
View main.py
from openpyxl import Workbook, load_workbook
from openpyxl.styles.borders import Border, Side
import os
import re
def getData(filePath):
wb = load_workbook(filename=filePath)
sheet = wb.worksheets[0]
row_count = sheet.max_row
@liudonghua123
liudonghua123 / bind-update-script.sh
Created Sep 14, 2018 — forked from mattrude/bind-update-script.sh
Bind 9.11+ Update script for Ubuntu 16.04 LTS
View bind-update-script.sh
#!/bin/bash
BINDVER=`curl -slL ftp://ftp.isc.org/isc/bind9/cur/9.11/ |grep ".tar.gz$" |sed 's/bind-//g' |sed 's/.tar.gz//g'`
if [ -f /usr/local/sbin/named ]; then
CURRENTVER=`/usr/local/sbin/named -v |awk '{ print $2 }'`
elif [ -f /usr/sbin/named ]; then
CURRENTVER=`/usr/sbin/named -v |awk '{ print $2 }'`
else
CURRENTVER=0
@liudonghua123
liudonghua123 / visor-archivos-online.md
Created Sep 12, 2018 — forked from vrajroham/visor-archivos-online.md
Google Docs Viewer & Office Web Apps Viewer
View visor-archivos-online.md

Google Docs Viewer

Only files under 25 MB can be previewed with the Google Drive viewer.

Google Drive viewer helps you preview over 16 different file types, listed below:

  • Image files (.JPEG, .PNG, .GIF, .TIFF, .BMP)
  • Video files (WebM, .MPEG4, .3GPP, .MOV, .AVI, .MPEGPS, .WMV, .FLV)
  • Text files (.TXT)
  • Markup/Code (.CSS, .HTML, .PHP, .C, .CPP, .H, .HPP, .JS)
  • Microsoft Word (.DOC and .DOCX)
@liudonghua123
liudonghua123 / convert.sh
Created Jun 29, 2018
convert image batch scripts
View convert.sh
#!/bin/bash
convert_percentage=25%
output_folder=resized-images-${convert_percentage}
# if [ ! -d ${output_folder} ]
# then
# mkdir -p ${output_folder}
# fi
[ -d ${output_folder} ] || mkdir -p ${output_folder}
for filename in origin/*.jpg; do
echo convert -resize ${convert_percentage} $filename ${output_folder}/$(basename $filename)
@liudonghua123
liudonghua123 / gcc.bat
Created Jun 29, 2018
Some configuration files for c/c++ dev on wsl of vscode.
View gcc.bat
c:/windows/sysnative/bash.exe -c "gcc -g %1 -o %2"
@liudonghua123
liudonghua123 / LinkedList.py
Last active Jun 21, 2018
Simple python implementation of LinkedList
View LinkedList.py
# coding=utf-8
class LinkedList(object):
# define the node type
class Node:
def __init__(self, element, next):
self.element = element
self.next = next
@liudonghua123
liudonghua123 / stack_queue.py
Created Jun 21, 2018
Simple Stack and Queue implementation
View stack_queue.py
# coding=utf-8
class Stack(object):
def __init__(self):
self.data = []
def pop(self):
return self.data.pop()
def push(self, element):
@liudonghua123
liudonghua123 / vsCodeOpenFolder.reg
Last active Feb 28, 2018
Right click on Windows folder and open with Visual Studio Code
View vsCodeOpenFolder.reg
Windows Registry Editor Version 5.00
; Open files
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code]
@="Edit with VS Code"
"Icon"="C:\\Program Files\\Microsoft VS Code\\Code.exe,0"
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%1\""
; This will make it appear when you right click ON a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\shell\vscode]
You can’t perform that action at this time.