Skip to content

Instantly share code, notes, and snippets.

View zhaopengme's full-sized avatar

zhaopeng zhaopengme

View GitHub Profile

SQLite3 Electron windows integration

This guide is based on the very informative discussion in this article: Using node_sqlite3 with Electron

Install sqlite3

npm install sqlite3 --save
@zhaopengme
zhaopengme / go.sh
Created August 4, 2017 02:30 — forked from witooh/go.sh
[Go] Ubuntu install
wget http://golang.org/dl/go1.3.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.3.linux-amd64.tar.gz
sudo echo "PATH=$PATH:/vagrant/go/bin:/usr/local/go/bin" >> ~/.profile
sudo echo "export GOPATH=/vagrant/go" >> ~/.profile
sudo echo "export GOROOT=/usr/local/go" >> ~/.profile
source ~/.profile
@zhaopengme
zhaopengme / tensorflow_cuda_osx.md
Created July 7, 2017 03:18 — forked from Mistobaan/tensorflow_cuda_osx.md
How to enable cuda support for tensor flow on Mac OS X (Updated on April:2016 Tensorflow 0.8)

These instructions will explain how to install tensorflow on mac with cuda enabled GPU suport. I assume you know what tensorflow is and why you would want to have a deep learning framework running on your computer.

Prerequisites

Make sure to update your homebrew formulas

brew update
@zhaopengme
zhaopengme / facebook-wca-standard-events.html
Created July 3, 2017 03:39 — forked from danielmcclure/facebook-wca-standard-events.html
Sample Facebook Standard Events for New Facebook WCA (Website Custom Audience) Pixel
<!-- Facebook Custom Audience Pixel Code - Placed on Every Page of Site -->
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','//connect.facebook.net/en_US/fbevents.js');
fbq('init', '{{facebook pixel}}');
fbq('track', 'PageView');
</script>
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@zhaopengme
zhaopengme / adb-shellinput.sh
Created March 8, 2017 12:46 — forked from femontanha/adb-shellinput.sh
Open Debugger React Native (Android Device adb shell input)
adb shell input keyevent 82
@zhaopengme
zhaopengme / cuda.sh
Created January 24, 2017 03:37 — forked from dapperfu/cuda.sh
CUDA
# CUDA.
apt-get install wget
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.44-1_amd64.deb
dpkg -i cuda-repo-ubuntu1604_8.0.44-1_amd64.deb
apt-get update -y
# Recomends on a bare system installs a *ton* of 'junk', including the Ubuntu desktop. debtree chokes on telling you why.
apt-get install --no-install-recommends cuda
# NVIDIA CUDA® Deep Neural Network library (cuDNN)
# https://developer.nvidia.com/cud
sudo apt-get install zsh
wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
chsh -s /bin/zsh
sudo reboot
@zhaopengme
zhaopengme / ConEmu Git Bash.md
Created January 21, 2017 07:04 — forked from n3dst4/ConEmu Git Bash.md
My ConEmu / Cmder git bash task config
  1. Open Conemu

  2. Open Settings -> Tasks or go to new tab button -> Setup tasks.

  3. Click + to add a new task

  4. Enter the name as Git Bash or whatever you like

  5. Task parameters:

     /icon "C:\Program Files (x86)\Git\etc\git.ico" /dir "C:\_git"
    
  6. Command:

#!/bin/bash
sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine winetricks
winetricks vcrun6 corefonts