Skip to content

Instantly share code, notes, and snippets.

View dperrera's full-sized avatar

Dan Perrera dperrera

View GitHub Profile
@dperrera
dperrera / where-jsonb-example.sql
Last active April 4, 2020 20:38
Query JSONB column in Postgres
-- Selects all from recipe table where the ingredients of a recipe
-- has a name that includes potato (case insensitive)
SELECT *
FROM recipe, jsonb_array_elements(recipe.ingredients) ingredient
WHERE ingredient->>'name' ILIKE 'PoTaTo'
@dperrera
dperrera / dperrera.zsh-theme
Last active November 4, 2016 23:09
My personal OhMyZsh Theme
local ret_status="%(?:%{$fg_bold[green]%}→:%{$fg_bold[red]%}→%s)"
#ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}"
#ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
#ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%} %{$fg[yellow]%}✗%{$reset_color%}"
#ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}"
# Adapted from code found at <https://gist.github.com/1712320>.
# Modify the colors and symbols in these variables as desired.
@dperrera
dperrera / shipit.js
Created May 7, 2015 17:00
Shipit File
// ==================================================
// Shipit Commands
// ==================================================
// deploy
// pull-assets
// backup-local-db
// update-local-db
// sync-local
// backup-production-db
// update-production-db
@dperrera
dperrera / gulpfile.js
Last active January 3, 2016 22:19
My gulpfile.js
// ==================================================
// Gulp Variables
// ==================================================
var gulp = require('gulp'),
gutil = require('gulp-util');
// Compass
var compass = require('gulp-compass');
@dperrera
dperrera / mq-2x.sass
Created May 16, 2013 01:41
A 2x media query
@mixin mq-2x
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-moz-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx)
@content
@dperrera
dperrera / st2-settings
Created August 24, 2012 19:04
My Sublime Text 2 Settings
{
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/User/Monokai Soda.tmTheme",
"font_face": "Inconsolata-dz",
"font_size": 12.0,
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage",