Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View fidiego's full-sized avatar
💭
🤔

Dat Boi Diego fidiego

💭
🤔
View GitHub Profile
# vim: syntax=dockerfile
### Multi-stage build
### 1. django: install dependencies
# FROM python:3.7.7-alpine3.11 for build step
FROM python@sha256:778802b5b9797279772814fb15a7c6ee494848ced17965bb57092a0b900c0e4f as builder
# install dependencies to build c-extensions
RUN apk update && apk add --no-cache \
gcc \
@fidiego
fidiego / slate.conf
Created August 9, 2018 21:58
Config file for gh:jigish/slate
####
# Resize Bindings
####
# Full Screen
bind m:cmd;alt;ctrl push right bar-resize:screenSizeX
# throw to monitor
bind left:ctrl;alt throw next
bind right:ctrl;alt throw next
@fidiego
fidiego / .gitconfig
Last active November 20, 2017 18:03
Dotfiles - The structure and content of my dotfiles
[alias]
br = branch
co = checkout
lg = log --color --date=local --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit
log = log --topo-order --decorate
st = status -sb
up = fetch --all --prune
pup = !git fetch --all --prune && git pull
[diff]
@fidiego
fidiego / tornado_slackbot.py
Created October 19, 2016 23:12
A tornado-based slackbot.
```
Tornado-based slack client inspired by the full stack python version:
https://www.fullstackpython.com/blog/build-first-slack-bot-python.html
Polls the rtm_stream every second w/ a periodic callback
```
import logging
import os
import time
@fidiego
fidiego / search-secrets
Last active October 14, 2016 16:37
A little script for searching mono secrets.
#!/bin/python
import getpass
import os
import sys
import envoy
def get_secret_files():
secret_files = {}
for subdir, dirs, files in os.walk('/opt/buzzfeed/mono'):
@fidiego
fidiego / .gitconfig
Last active May 24, 2016 14:30
commonly used dotfiles
[core]
whitespace = space-before-tab,trailing-space,cr-at-eol
ignorecase = false
[diff]
renames = copy
[pack]
threads = 0
[push]
default = simple
[credential]
@fidiego
fidiego / .curl-format.txt
Last active April 20, 2016 16:43
curltime: bash script for pretty printing time spent curling. Totatally based off of this SO answer: http://stackoverflow.com/questions/18215389/how-do-i-measure-request-and-response-times-at-once-using-curl
time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n
time_appconnect: %{time_appconnect}\n
time_pretransfer: %{time_pretransfer}\n
time_redirect: %{time_redirect}\n
time_starttransfer: %{time_starttransfer}\n
----------\n
time_total: %{time_total}\n
/*
Solid is BuzzFeed's CSS style guide.
solid.buzzfeed.com
*/
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS and IE text size adjust after device orientation change,
* without disabling user zoom.
*/
'''
platform_data_api/settings/__init__.py
--------------------------------------
Reads the environment and configures all the things
'''
from load_conf import config
ENV = ENVIRONMENT = config['env']
# GIT AWARE BASH
export GITAWAREPROMPT=~/.bash/git-aware-prompt
source "${GITAWAREPROMPT}/main.sh"
# PATHS
export PATH=$PATH:~/bin/
export PATH=$PATH:/usr/local/bin/
export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.4/bin/
export PATH=$PATH:/usr/local/Cellar/graphviz/2.38.0/bin/