Skip to content

Instantly share code, notes, and snippets.

View shey's full-sized avatar

Sheheryar Sewani shey

View GitHub Profile
.PHONY: help
.DEFAULT_GOAL := help
help: ## Displays this help message.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
.PHONY: deploy
deploy: ## Deploy the app to the 'staging' environment
bundle exec cap staging deploy
@shey
shey / __init__.py
Last active November 14, 2022 22:58
json logging for flask/rq
from pythonjsonlogger import jsonlogger
logger = logging.getLogger()
logHandler = logging.StreamHandler()
formatter = jsonlogger.JsonFormatter('%(asctime)s %(levelname)s %(module)s %(message)s')
logHandler.setFormatter(formatter)
logger.handlers.clear()
logger.setLevel(logging.INFO)
@shey
shey / mixins.py
Created July 9, 2022 18:11 — forked from lu911/mixins.py
SQLAlchemy Mixins
# -*- coding:utf-8 -*-
from flask import abort
from datetime import datetime
from project.ext import db
class IdMixin(object):
"""
Provides the :attr:`id` primary key column
@shey
shey / site.yml
Created January 7, 2016 15:56
site.yml
- name: Add app nginx-site config
template: src=app.j2
dest=/etc/nginx/sites-available/app
owner=www-data group=www-data
mode=0644
backup=yes
notify: restart nginx
tags: config
- name: enable app
@shey
shey / jenkins-2_id.rsa.pub
Created October 6, 2015 15:43
jenkins_id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQClUvgLhQMw5WvcA0xN7h67ZH260j2dwWDObfY/CxeZyvL3eBjnEwo2mtr5+aSnIpQe15oSW0XBbF+QyAhBBvsdC7gMh6VP0hS4fFX+d44PqwrzredBKNRPk+J1kyTFeAKma7C25ngMKCCpaGRUoRcJsyJ58C2OnZ6BDNYjW98TeYgpuJc2tIae4QiU8ZH3a6SdlwBYkHNtEarnBI0zu1psAQ/+t77zy6JhcY+Qdt9mrFDUDQxj2S0HG9yBtXjCyArvEgRRNKNmTS8D2W4T0DqTheZhAGi3dBHd2koITgLHfahr+oYukM0a82sDUPGQltfEZrLwgEZn7Kctsh18zvUh jenkins
@shey
shey / latency.md
Last active August 29, 2015 14:27
Brandon Kane (2):
Update epoch file
Merge pull request #1030 from VantageAnalytics/update-epoch
David Vincelli (4):
VA-2294. add storages to INSTALLED_APPS
Merge pull request #1031 from VantageAnalytics/VA-2294-add-storages-to-installed-apps
VA-2294. Remove the hashed file mixin, it is causing confusion
Merge pull request #1032 from VantageAnalytics/VA-2294-remove-hashed-file-mixin
Brandon Kane (2):
Update epoch file
Merge pull request #1030 from VantageAnalytics/update-epoch
David Vincelli (4):
VA-2294. add storages to INSTALLED_APPS
Merge pull request #1031 from VantageAnalytics/VA-2294-add-storages-to-installed-apps
VA-2294. Remove the hashed file mixin, it is causing confusion
Merge pull request #1032 from VantageAnalytics/VA-2294-remove-hashed-file-mixin
} moo-clientcide-1.3.js?jobofferinsidebar:2969
window.shoplocket.cookies.getItem("wcsid")
null
window.shoplocket.cookies.setItem("shey", "noo way")
true
window.shoplocket.cookies.getItem("shey")
"noo way"
window.shoplocket.cookies.removeItem("shey")
true
window.shoplocket.cookies.getItem("shey")
@shey
shey / put.py
Created January 27, 2011 07:07
c.put.albums(id='c3ea09f0-9758-480c-aa25-0f71a9caa446', Name='Transatlanticism', Band='Death Cab For Cutie')