Skip to content

Instantly share code, notes, and snippets.

@roberttaraya
roberttaraya / .gitignore_global
Created June 25, 2021 14:20
Git ignore global file
# Created by https://www.gitignore.io/api/osx,ruby,node,rails,sublimetext
### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

<?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>AppleAntiAliasingThreshold</key>
<integer>1</integer>
<key>ApplePressAndHoldEnabled</key>
<false/>
<key>AppleScrollAnimationEnabled</key>
<integer>0</integer>
@roberttaraya
roberttaraya / settings.json
Last active June 24, 2021 03:51
VS Code Editor settings
{
"diffEditor.ignoreTrimWhitespace": false,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.fontSize": 20,
"editor.fontWeight": "normal",
"editor.formatOnPaste": true,
"editor.minimap.enabled": false,
"editor.multiCursorModifier": "ctrlCmd",
"editor.rulers": [ 50, 72, 100, 130 ],
"editor.scrollBeyondLastLine": true,
@roberttaraya
roberttaraya / keybindings.json
Last active June 24, 2021 04:15
vs code keybindings preferences
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "shift+cmd+l",
"command": "-selectAllSearchEditorMatches",
"when": "inSearchEditor"
},
{
"key": "shift+cmd+l",
"command": "-addCursorsAtSearchResults",
@roberttaraya
roberttaraya / csvsplit.rb
Created September 6, 2020 21:57 — forked from pnomolos/csvsplit.rb
Splits a CSV file into multiple, smaller chunks.
#!/usr/bin/env ruby -w
file = "products.csv"
lines_per_file = 20000
header_lines = 1
extension = File.extname(file)
basename = File.basename(file, extension)
File.open(file) do |f|
@roberttaraya
roberttaraya / gist:fedc3eb370e2425d978ba41f3bf3855b
Created September 5, 2020 21:37 — forked from arjunvenkat/gist:1115bc41bf395a162084
Seeding a Rails database with a CSV file

How to seed a Rails database with a CSV file

1. Setup

First, Create a folder inside of lib called seeds

Put your CSV file example.csv into the lib/seeds folder. In the example below, the file is called real_estate_transactions.csv

Make sure you've created a resource with the appropriate columns to match your seed data. The names don't have to match up.

@roberttaraya
roberttaraya / tab-trigger.js
Created December 18, 2018 15:35 — forked from wesbos/tab-trigger.js
How to properly get a TAB trigger working with Emmet inside of JSX
{
"keys": ["tab"],
"command": "expand_abbreviation_by_tab",
// put comma-separated syntax selectors for which
// you want to expandEmmet abbreviations into "operand" key
// instead of SCOPE_SELECTOR.
// Examples: source.js, text.html - source
"context": [
{
@roberttaraya
roberttaraya / Solarized (Dark) (SL).tmTheme
Last active June 3, 2017 18:25
Sublime Text Solarized Dark Theme
<?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>name</key>
<string>Solarized (dark)</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@roberttaraya
roberttaraya / .gemrc
Created March 18, 2017 04:34 — forked from dwayne/.gemrc
Keep track of my setup for Ruby and Rails tools
install: --no-document # See http://guides.rubygems.org/command-reference/#gem-install
update: --no-document # See http://guides.rubygems.org/command-reference/#gem-update
:backtrace: true