I hereby claim:
- I am droustchev on github.
- I am droustchev (https://keybase.io/droustchev) on keybase.
- I have a public key whose fingerprint is 3331 3910 BB89 4F2E 61BE 9521 E545 6303 EA1B 8E0F
To claim this, I am signing this object:
<DiskConfiguration> | |
<WillShowUI>OnError</WillShowUI> | |
<Disk> | |
<DiskID>0</DiskID> | |
<WillWipeDisk>true</WillWipeDisk> | |
<CreatePartitions> | |
<CreatePartition> | |
<Order>1</Order> | |
<Size>100</Size> | |
<Type>Primary</Type> |
function getDateString (date) { | |
year = date.getFullYear(); | |
month = ('0' + (date.getMonth()+1)).slice(-2); | |
day = ('0' + date.getDate()).slice(-2); | |
return year + "-" + month + "-" + day; | |
} | |
function dateIterator (colBaseName, startDate, dayCount) { | |
var date = startDate | |
var i = 0; |
function dropCollections (colName) { | |
var collectionNames = db.getCollectionNames(); | |
for (var i=0,len=collectionNames.length; i<len; i++) { | |
var collectionName = collectionNames[i]; | |
if(collectionName.indexOf(colName) == 0) { | |
db[collectionName].drop(); | |
} | |
} | |
} |
from sqlalchemy.ext.compiler import compiles | |
from sqlalchemy.sql.expression import Insert | |
@compiles(Insert) | |
def append_string(insert, compiler, **kw): | |
s = compiler.visit_insert(insert, **kw) | |
if 'append_string' in insert.kwargs: | |
return s + " " + insert.kwargs['append_string'] | |
return s |
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.1/moment.js"></script> | |
<script> | |
var langs = [ | |
'en', | |
'de', | |
'es', | |
'fr', | |
'fr-ca', | |
'id', | |
'tr', |
I hereby claim:
To claim this, I am signing this object:
I recently tried out the fantastic vim-tmux-navigator
tmux plugin.
Unfortunately, some the default key bindings conflict with some of the key bindings my fuzzy finder of choice uses.
I wanted to remap them to the default vim split navigation commands that are prefixed with C-w
, and found the solution of
hjdivad in his gist. However, I wanted a simpler solution, so after
some more digging I stumbled upon this reddit post
and ultimately came up with the following solution, which doesn't rely on key bindings that unbind themselves, but uses tmux's
'key-tables'.
tmux ls && read tmux_session && tmux attach -t ${tmux_session:-default} || tmux new -s ${tmux_session:-default} |