Skip to content

Instantly share code, notes, and snippets.

View engalar's full-sized avatar

wengao liu engalar

  • https://www.mendix.com/
  • zhuhai/guangdong/china
  • 10:47 (UTC +08:00)
View GitHub Profile
@engalar
engalar / waya-dl-setup.sh
Last active November 1, 2017 13:45 — forked from mjdietzx/waya-dl-setup.sh
Install CUDA Toolkit v8.0 and cuDNN v6.0 on Ubuntu 16.04
#!/bin/bash
# install CUDA Toolkit v8.0
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network))
CUDA_REPO_PKG="cuda-repo-ubuntu1604_8.0.61-1_amd64.deb"
echo CUDA_REPO_PKG
if [ -f ${CUDA_REPO_PKG} ]; then
echo 'use cache'
fi
if [ ! -f ${CUDA_REPO_PKG} ]; then
@engalar
engalar / x6s.txt
Last active November 3, 2017 06:07
ubuntu install
sudo -H mkdir /mnt/e
sudo -H mkdir /mnt/d
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
@engalar
engalar / open_tensor_board.py
Created November 3, 2017 06:20
python code to open tensorboard
import tensorboard.main as tb
tb.FLAGS.logdir='log'
tb.main()
const jszip = require('xlsx/jszip');
const fs = require('fs');
const XmlDocument = require('xmldoc').XmlDocument;
function get_rels_path(file) {
var n = file.lastIndexOf("/");
return file.substr(0,n+1) + '_rels/' + file.substr(n+1) + ".rels";
}
netsh interface ip set address name="以太网" static 10.231.131.56 255.255.255.0 10.231.131.254
netsh interface ip set dns name="以太网" source=static addr=none
netsh interface ip add dns name="以太网" addr=8.8.4.4 index=1
netsh interface ip add dns name="以太网" addr=10.220.130.221 index=2
# Installation of basic build dependencies
## Debian / Ubuntu
sudo apt-get install --no-install-recommends gettext build-essential autoconf libtool libpcre3-dev asciidoc xmlto libev-dev libc-ares-dev automake libmbedtls-dev libsodium-dev
## CentOS / Fedora / RHEL
#sudo yum install gettext gcc autoconf libtool automake make asciidoc xmlto c-ares-devel libev-devel
## Arch
#sudo pacman -S gettext gcc autoconf libtool automake make asciidoc xmlto c-ares libev
# Installation of Libsodium
export LIBSODIUM_VER=1.0.13
@engalar
engalar / gpg_git_signing.md
Last active May 10, 2018 05:12 — forked from alopresto/gpg_git_signing.md
Steps to enable GPG signing of git commits.

If anyone is interested in setting up their system to automatically (or manually) sign their git commits with their GPG key, here are the steps:

windows

cd C:\Program Files (x86)\GNU\GnuPG
.\gpg.exe --gen-key # 4096
.\gpg.exe --list-secret-keys --keyid-format LONG

.\gpg.exe --armor --export 3AA5C34371567BD2
@engalar
engalar / frpc
Last active July 17, 2019 06:03 — forked from NemoAlex/frpc
/etc/init.d/frpc on OpenWrt
#!/bin/sh /etc/rc.common
START=99
USE_PROCD=1
start_service() {
procd_open_instance "frpc"
procd_set_param command /root/frp/frpc -c /root/frp/frpc.ini
procd_set_param stdout 1
procd_set_param stderr 1
@engalar
engalar / VOCDetection.py
Created July 31, 2019 01:29
pytorch voc dataset
import torch, torchvision
from PIL import Image
import sys
if sys.version_info[0] == 2:
import xml.etree.cElementTree as ET
else:
import xml.etree.ElementTree as ET
import os
import collections
@engalar
engalar / init.vim
Created February 10, 2020 03:51 — forked from benawad/init.vim
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'