As configured in my dotfiles.
start new:
tmux
start new with session name:
# Dependency Injection in Python 3 with Testing | |
class MessageFormatter: | |
def success(self, message): | |
return f"👍 {message}" | |
class MessageWriter: | |
def __init__(self): | |
self.message_formatter = MessageFormatter() |
As configured in my dotfiles.
start new:
tmux
start new with session name:
// The location o this file: ~/Library/Application Support/Code/User/keybindings.json | |
[ | |
{ | |
"key": "cmd+\\", | |
"command": "workbench.action.toggleSidebarVisibility" | |
}, | |
{ | |
"key": "cmd+b", | |
"command": "-workbench.action.toggleSidebarVisibility" | |
}, |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
#============================================================================== | |
#TITLE: mysql_backup.sh | |
#DESCRIPTION: script for automating the daily mysql backups on development computer | |
#AUTHOR: tleish | |
#DATE: 2013-12-20 | |
#VERSION: 0.4 | |
#USAGE: ./mysql_backup.sh | |
#CRON: | |
# example cron for daily db backup @ 9:15 am |
function pagination(c, m) { | |
var current = c, | |
last = m, | |
delta = 2, | |
left = current - delta, | |
right = current + delta + 1, | |
range = [], | |
rangeWithDots = [], | |
l; | |
Sublime Text 3 - Handy Shortcuts | |
================================= | |
Open/Goto | |
_________ | |
- command+t: go to file | |
- command+ctrl+p: go to project | |
- command+r: go to methods | |
- command+shift+p: command prompt | |
- ctrl+g: go to line |
#!/bin/bash | |
# Ths script drops a MySQL db if it already exists and then creates a MySQL db with username/password. | |
# The script can belled as: | |
# . mysql_db_reset.sh testdb testuser secretpass | |
# | |
BTICK='`' | |
EXPECTED_ARGS=3 | |
E_BADARGS=65 | |
MYSQL=`which mysql` |
import os, logging, httplib2, json, datetime | |
from django.core.urlresolvers import reverse | |
from django.http import HttpResponseRedirect, HttpResponseBadRequest, JsonResponse | |
from django.contrib import messages | |
from django.contrib.auth.decorators import login_required | |
from django.contrib.auth.models import User | |
from django.utils import timezone |
from oauth2client.client import flow_from_clientsecrets | |
from oauth2client.django_orm import Storage | |
from oauth2client import xsrfutil | |
from django.conf import settings | |
from django.views.decorators.csrf import csrf_protect | |
from .models import GoogleCredentialsModel | |
from apiclient.discovery import build | |
import os, logging, httplib2, json, datetime | |
import gdata.spreadsheets.client |