This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| "os" | |
| "path/filepath" | |
| ) | |
| func main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #------------------------------------------------- | |
| # | |
| # Project created by QtCreator 2017-02-06T09:02:49 | |
| # | |
| #------------------------------------------------- | |
| QT += core gui webenginewidgets | |
| greaterThan(QT_MAJOR_VERSION, 4): QT += widgets |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'webrick' | |
| include WEBrick | |
| server = HTTPServer.new(Port: 3_000) | |
| server.mount_proc('/') do |req, res| | |
| res['Pragma'] = 'no-cache' | |
| res.set_redirect(HTTPStatus::MovedPermanently, | |
| "uri_to_redirect#{req.path}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set noautofocus | |
| "let scrollstep=50 | |
| let blacklists = ["https://feedly.com/*","https://mail.google.com/*","https://outlook.office.com/owa/*","https://twitter.com/"] | |
| map K previousTab | |
| map J nextTab | |
| map \t lastUsedTab | |
| unmap e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set incsearch | |
| set ignorecase | |
| set smartcase | |
| set wildmenu | |
| set wildstyle=popup | |
| set sortnumbers | |
| nnoremap t tj | |
| nnoremap x :shell<cr> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %windir%\system32\cmd.exe "/K" C:\Users\%USERNAME%\AppData\Local\Continuum\Anaconda3\Scripts\activate.bat C:\Users\%USERNAME%\AppData\Local\Continuum\Anaconda3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @FOR /F "delims=" %%i IN ('@call "C:\Users\%USERNAME%\AppData\Local\Continuum\Anaconda3\Scripts\conda.exe" ..activate "cmd.exe" %1') DO @SET "NEW_PATH=%%i" | |
| @SET PATH=%NEW_PATH%;%PATH% | |
| python %2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rexml/document' | |
| class Mm2Txt | |
| def self.convert(filename, out=STDOUT) | |
| contents = File.open(filename, 'r', &:read) | |
| doc = REXML::Document.new(contents) | |
| Impl.traverse(0, doc.elements['//map/node'], out) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dlls = Dir['**/*.dll'] | |
| dlls.each do |dll| | |
| debug_version_dll_name = dll.sub(/^(.*)\.dll$/, '\1d.dll') | |
| if dlls.include?(debug_version_dll_name) | |
| puts "Delete #{debug_version_dll_name}" | |
| File.delete(debug_version_dll_name) | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class A | |
| native_class if RUBY_ENGINE == 'opal' | |
| def a | |
| puts 'a' | |
| end | |
| native_alias :a, :a if RUBY_ENGIN == 'opal' | |
| end |