Skip to content

Instantly share code, notes, and snippets.

View engalar's full-sized avatar

engalar

  • https://www.mendix.com/
  • zhuhai/guangdong/china
View GitHub Profile
Function FileExists(ByVal fname As String) As String
Dim objFSO As Object
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(fname) Then
FileExists = "1"
Else
FileExists = "0"
End If
'IMPORTANT - CHANGE gtExampleLoad() to include gtDoit() for each Gist you want to load
' bootstrap code to update VBA modules from gists
' all code is in this module - so no classes etc.
' latebinding is used to avoid need for any references
' can be found at https://gist.github.com/3403537
Option Explicit
' v2.04 - 3403537
' if you are using your own gists - change this
Const gistOwner = "brucemcpherson"
@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 / 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 / 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'
@engalar
engalar / .ideavimrc
Last active October 9, 2020 06:45 — forked from dewaka/.ideavimrc
inoremap jk <ESC>
:map \r :action ReformatCode<CR>
:map gb :action Back<CR>
:map gw :action Forward<CR>
set rnu
set ignorecase
set smartcase
set scrolloff=3 " 3 lines above/below cursor when scrolling