Skip to content

Instantly share code, notes, and snippets.

View zhaopengme's full-sized avatar

zhaopeng zhaopengme

View GitHub Profile
import com.sun.javafx.application.PlatformImpl;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javafx.application.Platform;
import javafx.collections.ObservableList;
import javafx.embed.swing.JFXPanel;
import javafx.scene.Group;
import javafx.scene.Node;
@zhaopengme
zhaopengme / OpenPowerShellHere.reg
Created August 31, 2016 07:38 — forked from codewithtyler/OpenPowerShellHere.reg
Creates a context menu item allowing you to open a PowerShell window in whatever directory you have clicked.
Windows Registry Editor Version 5.00
;
; Add context menu entry to Windows Explorer background
;
[HKEY_CLASSES_ROOT\Directory\Background\shell\powershell]
@="Open PowerShell window here"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\Background\shell\powershell\command]
@zhaopengme
zhaopengme / ContextCmder-Disable.reg
Created November 23, 2016 15:53 — forked from jojobyte/ContextCmder-Disable.reg
Cmder Context (Right-Click) Menu for Windows 7/8
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder]
[-HKEY_CLASSES_ROOT\Directory\shell\Cmder]
@zhaopengme
zhaopengme / init.bat
Created November 23, 2016 15:55 — forked from 17/init.bat
Cmder explorer context menu integration
@echo off
SET CMDER_ROOT=%~dp0
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\Cmder" /ve /d "Cmder Here" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\Cmder" /v "Icon" /d "\"%CMDER_ROOT%cmder.exe\"" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\Cmder" /v "Extended" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\Cmder\command" /ve /d "\"%CMDER_ROOT%cmder.exe\" \"%%V\"" /f
pause
@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:

@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
@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
#!/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 / 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>
@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