Skip to content

Instantly share code, notes, and snippets.

View pauldruziak's full-sized avatar

Paul pauldruziak

View GitHub Profile
@pauldruziak
pauldruziak / gem-install-libv8-darwin-21.sh
Created December 1, 2021 20:20
./gem-install-libv8-darwin-21.sh 7.3.492.27.1
#!/bin/bash
# filename: gem-install-libv8-darwin-20.sh
set -e
set -u
set -o pipefail
libv8_version="${1:-"8.4.255.0"}"
from='19'
to='21'
# Cleans up branches like:
# if Shopify.rails_next?
# # Rails 5 login
# else
# # Rails 4 login
# end
module RuboCop
module Cop
module ShopifyRails
class RailsNextUnless < Cop
@pauldruziak
pauldruziak / README.md
Last active March 27, 2016 18:43
Helper for navigation link

Put in your Gemfile:

gem 'nav_link', 'git@gist.github.com:034011db54668d4966ca.git'

Include NavLink in ApplicationHelper:

module ApplicationHelper
  include NavLink
end
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.25882352941176467</real>
<key>Green Component</key>
<real>0.21176470588235294</real>
@pauldruziak
pauldruziak / dbst.fish
Created April 16, 2015 13:36
Do I need reset db after I switch branch?
function dbst
set first_branch 'master'
set second_branch (git rev-parse --abbrev-ref HEAD)
if test (echo $argv | wc -w) -ge 1
set first_branch $argv[1]
end
if test (echo $argv | wc -w) -ge 2
set second_branch $argv[2]
end
git diff $first_branch...$second_branch --name-only db/migrate
{
"installed_packages":
[
"ApplySyntax",
"Better CoffeeScript",
"Capybara Snippets",
"Cucumber",
"Cucumber Step Finder",
"DashDoc",
"Gist",
@pauldruziak
pauldruziak / linux
Last active December 29, 2015 23:59
Configuring Bundler for faster, parallel gem installation
#!/usr/bin/env zsh
source ~/.zshrc
rvm 2.0.0-p247
gem install bundler --no-document --pre
number_of_cores=`nproc`
bundle config --global jobs `expr $number_of_cores - 1`
#!/bin/bash
# replace this variables
$prefix="prefix"
$mainapp="mainapp"
branch=$(git rev-parse --abbrev-ref HEAD)
app="$prefix-$branch"
heroku fork $app -a $mainapp
@pauldruziak
pauldruziak / README.md
Last active December 15, 2015 19:19 — forked from agnoster/README.md

agnoster-with-rvm.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark