Skip to content

Instantly share code, notes, and snippets.

View firecall's full-sized avatar

Alex Counsell firecall

View GitHub Profile
@firecall
firecall / install-ruby-3.2.2.sh
Last active September 20, 2023 04:50
Install Ruby 3.2.2 with rbenv and jemalloc on ubuntu
sudo apt-get update
sudo apt-get install libjemalloc-dev
RUBY_CONFIGURE_OPTS='--with-jemalloc' rbenv install 3.2.2
# test (look for jemalloc warnings)
MALLOC_CONF=invalid_flag:foo ruby -v
@firecall
firecall / Brewfile
Last active January 4, 2024 09:44
Brewfile
# TO USE
# xcode-select --install
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# brew bundle
tap "homebrew/core"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/services"
tap "homebrew/cask-fonts"
@firecall
firecall / .rubocop.yml
Last active January 12, 2024 08:16
.rubocop.yml
# Omakase Ruby styling for Rails
inherit_gem:
rubocop-rails-omakase: rubocop.yml
# Your own specialized rules go here
Layout/SpaceInsideArrayLiteralBrackets:
Enabled: false
Style/StringLiterals:
Enabled: false
@firecall
firecall / rails_form_field.html.erb
Last active January 21, 2022 00:47
Disable Auto Complete and Spell Check in a Rails Form Field
<%= f.text_field :fname, {
placeholder: 'First Name',
class: 'form-control',
required: true,
spellcheck: false,
autocomplete: 'off',
autocomplete: 'chrome-off',
autocorrect: 'off',
autocapitalize: 'off',
'data-gramm': false,
@firecall
firecall / .bash_profile
Last active October 11, 2023 07:13
My .zshrc / bash Profile
eval "$(/opt/homebrew/bin/brew shellenv)"
eval "$(rbenv init -zsh)"
export PATH="$HOME/.rbenv/bin:$PATH"
export PATH="/opt/homebrew/bin:$PATH"
export PATH="/opt/homebrew/sbin:$PATH"
#export PATH="/opt/homebrew/opt/openssl@1.1/bin:$PATH"
#export PATH="$(brew --prefix openssl@1.1)/bin:$PATH"
#export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)"
If you need to have openssl@3 first in your PATH, run:
@firecall
firecall / settings.json
Last active January 26, 2021 05:49
My Windows Terminal Config
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{2c4de342-38b7-51cf-b940-2309a097f518}",
"profiles":
@firecall
firecall / gist:6492454
Created September 9, 2013 07:27
Create a UIActionSheet from an NSArray
self.myActionSheet = [[UIActionSheet alloc] initWithTitle:@"Select Something" delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil, nil];
//self.myArray could be an array of CoreData objects
for (id myObject in self.myArray) {
[self.myActionSheet addButtonWithTitle:myObject.aString];
}
[self.myActionSheet addButtonWithTitle:@"Cancel"];
self.myActionSheet.cancelButtonIndex = [self.myActionSheet count];
@firecall
firecall / MYSQL Dump
Created March 20, 2011 01:39
MYSQL Dump from the command line
mkdir /Users/alex/Desktop/Dropbox/mysql_backup/client/$(date +%Y%m%d_%H%M%S); /usr/local/mysql/bin/mysqldump -h database_host -u username —password=mypassword clients_database > $_/clients_database.sql