This file contains 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
const a = [ 1, 2, 3, 4 ]; | |
const b = [ 5, 6, 7 ]; | |
const c = [ 8, 9 ]; | |
const d = { a, b, c } | |
function combinations(aryOfAry) { | |
const combination = (a1, a2) => { | |
let a = [] | |
a1.forEach((v1) => { |
This file contains 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
#ifndef ASYNC_QUEUE_HPP | |
#define ASYNC_QUEUE_HPP | |
#include <condition_variable> | |
#include <memory> | |
#include <mutex> | |
#include <queue> | |
#include <thread> | |
// async_queue is an asynchronous queue implementation. |
This file contains 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
[alias] | |
graph = log --graph --date=format:\"%Y-%m-%d %H:%M\" --pretty=\"format:%C(yellow)%h %C(cyan)%ad %C(green)%an%Creset%C(red)%d %Creset%s\" | |
g = log --graph --date=format:\"%Y-%m-%d %H:%M\" --pretty=\"format:%C(yellow)%h %C(cyan)%ad %C(green)%an%Creset%C(red)%d %Creset%s\" | |
ga = log --graph --date=format:\"%Y-%m-%d %H:%M\" --pretty=\"format:%C(yellow)%h %C(cyan)%ad %C(green)%an%Creset%C(red)%d %Creset%s\" --all | |
d = diff | |
dc = diff --cached | |
dn = diff --name-only | |
dns = diff --name-status | |
dw = diff --color-words | |
dcw = diff --cached --color-words |
This file contains 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
<!-- Window tiling key bindings (added) --> | |
<keybind key="C-A-4"> # HalfLeftScreen | |
<action name="Unmaximize"/> | |
<action name="MoveResizeTo"><x>0</x><y>0</y><height>100%</height><width>50%</width></action> | |
</keybind> | |
<keybind key="C-A-6"> # HalfRightScreen | |
<action name="Unmaximize"/> | |
<action name="MoveResizeTo"><x>50%</x><y>0</y><height>100%</height><width>50%</width></action> | |
</keybind> | |
<keybind key="C-A-8"> # HalfUpperScreen |
This file contains 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 |
This file contains 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 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 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 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 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> |
NewerOlder