Skip to content

Instantly share code, notes, and snippets.

View fidiego's full-sized avatar
💭
🤔

Dat Boi Diego fidiego

💭
🤔
View GitHub Profile
@fidiego
fidiego / photos
Last active October 12, 2015 15:28
Command for opening photo directories on OSX since Photos gives you a hard time if you try to find the path to an image.
#!/usr/bin/python
import os, sys
from datetime import datetime
def main():
docstring = """
Super Simple Script that opens Mac's Photo Library source directory so you
can get to your pictures etc.
-h prints this page
from collections import OrderedDict
from rest_framework import serializers
class SkipField(Exception):
pass
class ExtensibleModelSerializer(serializers.ModelSerializer):
'''

Keybase proof

I hereby claim:

  • I am fidiego on github.
  • I am cognitivereflex (https://keybase.io/cognitivereflex) on keybase.
  • I have a public key whose fingerprint is 06E4 06E3 AFCF 0B33 3786 F1BB 30BD 0F08 A5C9 6BDD

To claim this, I am signing this object:

@fidiego
fidiego / s3-config.static_site.json
Last active October 24, 2015 15:49
S3 bucket policy for static site hosting
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::${www.bucketname.com}/*"
}
# 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/
'''
platform_data_api/settings/__init__.py
--------------------------------------
Reads the environment and configures all the things
'''
from load_conf import config
ENV = ENVIRONMENT = config['env']
/*
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.
*/
@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
@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 / 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'):