Skip to content

Instantly share code, notes, and snippets.

View metasong's full-sized avatar
💭
improve metago

JZ Song metasong

💭
improve metago
  • Schlumberger
  • Houston, Tx
View GitHub Profile
@metasong
metasong / replacer.py
Created April 22, 2016 03:13 — forked from meddulla/replacer.py
Script to recursively replace string in filename and contents
"""
Usage: python script.py search_string replace_string dir
Eg. python batchreplace.py galleries productions /Sites/cjc/application/modules/productions/
And it will search recursively in dir
and replace search_string in contents
and in filenames.
Case-sensitive
"""
from sys import argv
1. install: docker toolbox (https://github.com/docker/toolbox/releases)
2. start kitematic and install tensorflow, and start it.
3. connect to running container: docker run -it -p 8888:8888 -v /c/Users/jsong12/tensorflow:/notebooks tensorflow/tensorflow
4. go to Kitematic and find the newly created container, open shell.
Using Bash
• Connect to running container – docker exec -it [Container ID] bash
• Start container with some share folder – docker run -it -v /c/Users/Data:/home tesorflow/tensorflow /bin/bash
docker run -it -p 8888:8888 -v /c/Users/jsong12/tensorflow:/notebooks tensorflow/tensorflow
http://192.168.99.100:8888/tree
@metasong
metasong / CapsLock.ahk
Created March 6, 2017 07:18 — forked from laxapple/CapsLock.ahk
CapsLock enhancement
;=====================================================================o
; Feng Ruohang's AHK Script |
; CapsLock Enhancement |
;---------------------------------------------------------------------o
; Modified by Colin Tang |
;---------------------------------------------------------------------o
;Description: |
; This Script is wrote by Feng Ruohang via AutoHotKey Script. It |
; Provides an enhancement towards the "Useless Key" CapsLock, and |
; turns CapsLock into an useful function Key just like Ctrl and Alt |
@metasong
metasong / CapsLockCtrlEscape.ahk
Created March 6, 2017 07:18 — forked from nocaoper/CapsLockCtrlEscape.ahk
Shift_CapsLock gives the original capsLock behaviour.... reload script on error
LShift & Capslock::
SetCapsLockState, % (State:=!State) ? "on" : "alwaysoff"
Return
g_AbortSendEsc := false
#InstallKeybdHook
SetCapsLockState, alwaysoff
Capslock::
g_DoNotAbortSendEsc := true
@metasong
metasong / create-new-file.ahk
Created June 8, 2017 05:19
AutoHotKey: Create a new file with Ctrl+Alt+N keyboard shortcut in Windows Explorer
; This is part of my AutoHotKey [1] script. When you are in Windows Explorer it
; allows you to press Ctrl+Alt+N and type a filename, and that file is created
; in the current directory and opened in the appropriate editor (usually
; [gVim](http://www.vim.org/) in my case, but it will use whatever program is
; associated with the file in Windows Explorer).
; This is much easier than the alternative that I have been using until now:
; Right click > New > Text file, delete default filename and extension (which
; isn't highlighted in Windows 7), type the filename, press enter twice.
; (Particularly for creating dot files like ".htaccess".)
@metasong
metasong / file1.txt
Last active November 17, 2017 00:28
the description for this gist
String file contents
ssssss
@metasong
metasong / SearchEverything.ahk
Created July 11, 2017 10:52 — forked from Onurtag/ExploreEverything.ahk
Search from current explorer folder, desktop and taskbar using Everything
#NoTrayIcon
#SingleInstance Force
MyUsername := "Onurtag" ;Go to %userprofile% and change this to the title of that window. Keep the quotes.
MyRecycleBin := "Recycle Bin" ;Go to your Recycle Bin and change this to the title of that window. Keep the quotes.
MyThisPC := "This PC" ;Go to your This PC and change this to the title of that window. Keep the quotes.
;You can delete below blocks if you don't want the features. Replace ^F with F3 if you are using that instead.
;BLOCK 1 - DESKTOP
using System;
public class ClassInGist
{
public void Hello()
{
Console.WriteLine("Hello from a gist");
}
}
@metasong
metasong / SurfingkeysSetting.js
Last active July 27, 2020 17:08
Surfingkeys Setting
unmap('u'); // u is used for undo;
/*
** iteration in collection or tree
**
** {: fist or root
** }: last or last leaf
** ]: next
** [: previous
** t: to
** |: time based last used(active)