start new:
tmux
start new with session name:
tmux new -s myname
plugin | |
naming convention: name_of_plugin.vim | |
these files are sourced for all file types | |
doc | |
naming convention: name_of_plugin.txt | |
these files document the functionality of a plugin | |
color | |
naming convention: name_of_colorscheme.vim |
#!/bin/bash | |
# | |
# DESCRIPTION: | |
# | |
# Set the bash prompt according to: | |
# * the active virtualenv | |
# * the branch/status of the current git repository | |
# * the return value of the previous command | |
# * the fact you just came from Windows and are used to having newlines in | |
# your prompts. |
template <typename... T> | |
constexpr auto make_array(T&&... values) -> | |
std::array< | |
typename std::decay< | |
typename std::common_type<T...>::type>::type, | |
sizeof...(T)> { | |
return {std::forward<T>(values)...}; | |
} |
import numpy | |
import scipy | |
import matplotlib.pyplot as pyplot | |
def decibel(lin): | |
"""Convert amplitude to decibel. | |
We might later need power to decibel...""" | |
return 20*numpy.log10(norm(lin)) |
#! /usr/bin/sh | |
# | |
# Build script to cross-compile OpenOCD with MinGW on Mint Linux (FTDI, JLINK, TI-ICDI, OSBDM). | |
# | |
# 7zip | |
# curl | |
# git | |
# MinGW-W64 | |
# libtool | |
# Automake |
from MySQLdb import cursors | |
from flask import request | |
class DataTablesServer(object): | |
def __init__( self, request, columns, index, table, cursor): | |
self.columns = columns | |
self.index = index | |
self.table = table | |
# values specified by the datatable for filtering, sorting, paging |
// @property (nonatomic) BOOL enabled; | |
// someObject = [OCMock partialMockForObject:[[SomeObject alloc] init]]; | |
[[[mock stub] andDo:^(NSInvocation *invocation) { | |
BOOL enabled = someObject.enabled; | |
NSValue *returnValue = [NSValue valueWithBytes:&enabled objCType:@encode(BOOL)]; | |
[invocation setReturnValue:&returnValue]; | |
}] enabled]; |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\