Skip to content

Instantly share code, notes, and snippets.

View djGrill's full-sized avatar
🚀

dAIvd djGrill

🚀
View GitHub Profile
@djGrill
djGrill / default.sublime-keymap
Created June 4, 2020 01:15
Sublime Text 3 Key Bindings
/*
On OS X, basic text manipulations (left, right, command+left, etc) make use of the system key bindings,
and don't need to be repeated here. Anything listed here will take precedence, however.
*/
[
{ "keys": ["super+shift+n"], "command": "new_window" },
{ "keys": ["super+shift+w"], "command": "close_window" },
{ "keys": ["super+o"], "command": "prompt_open" },
{ "keys": ["super+shift+t"], "command": "reopen_last_file" },
{ "keys": ["super+alt+up"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "hh", "h", "ipp", "inl", "m", "mm"]} },
@djGrill
djGrill / steps.md
Last active March 19, 2020 09:20
[react-native-newrelic] iOS configuration

Requirements

  • react-native: 0.59.10

Installation

Install react-native-newrelic

npm install react-native-newrelic --save
@djGrill
djGrill / commands.sh
Last active June 13, 2024 11:37
Useful Rails Commands
rails new . \
--api \
--minimal \ # https://github.com/rails/rails/blob/4a4b3998300fbebf537b770d842066b13dee5072/railties/lib/rails/generators/rails/app/app_generator.rb
--skip-asset-pipeline \
--skip-bundle \
--skip-keeps \
--skip-listen \
--skip-spring \
--skip-sprockets \
--skip-test \
@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]
@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 / 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 / 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 / .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 / 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 / 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);
}