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 August 25, 2021 21:59
Sublime Text 3 Settings
{
// Sets the colors used within the text area
"color_scheme": "Packages/Color Scheme - Default/Breakers.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".
// Because of this, setting them here will have no effect: you must set them
// in your User File Preferences.
"font_face": "Droid Sans Mono",
"font_size": 21,
@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 May 10, 2024 04:13
Zsh profile
# terminal customs
export BUNDLER_EDITOR=/usr/local/bin/code
export CLICOLOR=1
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)"
# history
export HISTCONTROL=erasedups
export HISTSIZE=100000
# fixes Postgre failure
@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]