- Locate the Terminal application within the Utilities folder. Either (Finder > Go menu > Utilities) or
open /Applications/Utilities/in your terminal - Select Terminal.app and right-click on it, then choose “Duplicate”
- Rename the duplicated Terminal app something obvious and distinct, like
Rosetta Terminal - Now select the freshly renamed
Rosetta Terminalapp and right-click and choose “Get Info” (or hit Command+i) - Check the box for “Open using Rosetta”, then close the Get Info window
- Restart the
Rosetta Terminal, which fully supports Homebrew and other x86 command line apps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| result_set = ApplicationRecord.connection.select_all("select * from pg_stat_user_tables") | |
| column_types = result_set.column_types.dup | |
| columns = result_set.columns.dup | |
| results = result_set.rows.map { |row| columns.zip(row).to_h } | |
| puts JSON.pretty_generate(results) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class String | |
| def parameterize(separator: "-") | |
| # Turn unwanted chars into the separator. | |
| self.gsub!(/[^a-z0-9\-_]+/i, separator) | |
| unless separator.nil? || separator.empty? | |
| if separator == "-" | |
| re_duplicate_separator = /-{2,}/ | |
| re_leading_trailing_separator = /^-|-$/i | |
| else |
This was incredibly annoying, but I found the results deep on a github issue: atom/atom#17672 (comment)
Instructions:
- Open
Security & Privacy - In the bottom-left corner,
Unlock to make changes - In the left panel, scroll down to
Full Disk Access - In the right panel, scroll down to find
Atomand check the box. - Close down the security settings panel
- Force-Quit Atom, by holding
control+optionbefore clicking the atom icon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var toastIDCounter = 0; | |
| (function ($) { | |
| $.fn.bsToast = function (options) { | |
| if (typeof options === "string") { | |
| options = { | |
| body: options | |
| } | |
| } | |
| var settings = $.extend({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'fileutils' | |
| Dir.glob('/Documents/dev/*').each do |directory| | |
| dir = directory.split("/").last | |
| next if File.file?(dir) | |
| is_git = false | |
| git_remote = "" | |
| has_changes = false | |
| message = "" |
Share this article!
TwitterLinkedInFacebookPocket[Buffer](https://www.addtoany.com/add_to/buffer?linkurl=https%3A%2F%2Fwww.atrium
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace :fetch do | |
| desc "fetch tachyons scss files" | |
| task :tachyons do | |
| `curl -LkSs https://github.com/tachyons-css/tachyons-sass/archive/v4.7.1.tar.gz | tar xz` | |
| `mv -f ./tachyons-sass-*/scss ./_sass/tachyons-sass` | |
| `mv -f ./tachyons-sass-*/tachyons.scss ./_sass/tachyons-sass` | |
| `rm -rf ./tachyons-sass-*` | |
| end | |
| desc "fetch bootstrap scss files" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'active_support' | |
| require 'active_support/core_ext' | |
| require 'json' | |
| JSON.parse(File.open("./_data/companies.json").read).each do |company| | |
| File.open("./_companies/#{company['name'].parameterize}.md", "w") do |f| | |
| f.write "---\n" | |
| f.write "layout: company\n" | |
| f.write "title: #{company['name']}\n" | |
| f.write "categories: prep\n" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class HighAvailabilityETL < RailsFoo | |
| has_one_attached :input | |
| has_one_attached :translate_step1 | |
| has_one_attached :translate_step2 | |
| has_one_attached :translate_step3 | |
| has_one_attached :output | |
| def runner | |
| step1_errors = input_to_translate_step1! unless input.attached? | |
| step2_errors = step1_to_step2! unless translate_step1.attached? |