Skip to content

Instantly share code, notes, and snippets.

View djGrill's full-sized avatar
🚀

dAIvd djGrill

🚀
View GitHub Profile
@djGrill
djGrill / config
Last active October 9, 2015 12:57
Git config -- UPDATE: I'm now only making use of Shell aliases: https://gist.github.com/djGrill/64b2dedac8c119e1e149
[user]
name = David Grilli
[color]
ui = true
[heroku]
remote = staging
[alias]
a = add
au = add --update
ba = branch -a
@djGrill
djGrill / Preferences.sublime-settings
Last active January 16, 2025 20:17
Sublime Text 3 Settings
{
// Sets the colors used within the text area.
// The value "auto" will switch between the "light_color_scheme" and
// "dark_color_scheme" based on the operating system appearance.
"color_scheme": "auto",
"light_color_scheme": "Breakers.sublime-color-scheme",
"dark_color_scheme": "Mariana.sublime-color-scheme",
// Note that the font_face and font_size are overridden in the platform
// specific settings file, for example, "Preferences (Linux).sublime-settings".
@djGrill
djGrill / style.css
Last active October 10, 2015 07:28
Custom CSS for blog posts
<style>
h1, h2, h3, p, span, i, a {
font-family: Helvetica Neue, Arial, Helvetica, sans-serif;
font-weight: normal;
margin-bottom: 12px;
}
h1, h2, h3 {
margin-top: 12px;
margin-bottom: 2px;
}
@djGrill
djGrill / mixin.scss
Created March 16, 2013 07:22
Example for using Sass Mixins
@mixin border-radius($value) {
-webkit-border-radius: $value;
-moz-border-radius: $value;
border-radius: $value;
}
div {
@include border-radius(10px);
}
@djGrill
djGrill / variables.scss
Created March 16, 2013 07:25
Example of using Sass Variables
$siteWidth: 1024px;
$gutterWidth: 20px;
$sidebarWidth: 300px;
body {
margin: 0 auto;
width: $siteWidth;
}
.content {
@djGrill
djGrill / .zshrc
Last active March 18, 2025 16:11
Zsh profile
# terminal customs
export BUNDLER_EDITOR=/usr/local/bin/subl
export CLICOLOR=1
# history
export HISTCONTROL=erasedups
export HISTSIZE=100000
# fixes Postgre failure
export PGHOST=localhost
@djGrill
djGrill / ga_wdi_git_daily_workflow.md
Last active February 23, 2023 10:42
This is what you should do every morning
  • commit all the classwork and homework files from yesterday (you can do as many commits as you want):

    git add <files>

    git commit -m "COMMIT MESSAGE"

  • push to GitHub:

    git push origin wXdY-gitusername

@djGrill
djGrill / pg_restore.sh
Last active March 7, 2016 14:46
pg_restore
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U myuser -d mydb latest.dump
@djGrill
djGrill / script.sh
Created March 9, 2016 10:58
Record deployment in New Relic
git_hash=$(git rev-parse --short HEAD)
curl -X POST -H "x-api-key:asdf1234" --data "deployment[app_name]=&deployment[revision]=${git_hash}" https://api.newrelic.com/deployments.xml
@djGrill
djGrill / challenges.rb
Created September 7, 2017 17:32
Challenges
# Where n is a positive integer, the function f(n) satisfies the following:
#
# f(0) = 0
# f(1) = 1
# f(n) = f(n - 1) + f(n - 2)
#
# Create a program to find f(n)
def super_sum(number)
results = [0, 1]