- on your repo's root, run :
find . -type f | xargs chmod -x
- commit this change on files :
commit -n -m 'fix: files permission from 100755 to 100644'
- then with
vim .git/config
, setfilemode
option tofalse
[core]
filemode = false
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'dry-auto_inject' | |
gem 'dry-transaction' | |
gem 'dry-container', git: 'https://github.com/dry-rb/dry-container' | |
end | |
class Container |
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work. | |
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0." | |
Database files have to be updated before starting the server, here are the steps that had to be followed: | |
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default | |
brew unlink postgresql | |
brew install [email protected] | |
brew unlink [email protected] | |
brew link postgresql |
-- This script can be used in conjunction with Better Touch Tool to display the currently playing track on the MacBook Pro TouchBar | |
-- More info here: https://lucatnt.com/2017/02/display-the-currently-playing-track-in-itunesspotify-on-the-touch-bar | |
if application "Spotify" is running then | |
tell application "Spotify" | |
if player state is playing then | |
return (get artist of current track) & " - " & (get name of current track) | |
else | |
return "" | |
end if |
-- This script can be used in conjunction with Better Touch Tool to display the currently playing track on the MacBook Pro TouchBar | |
-- More info here: https://lucatnt.com/2017/02/display-the-currently-playing-track-in-itunesspotify-on-the-touch-bar | |
if application "iTunes" is running then | |
tell application "iTunes" | |
if player state is playing then | |
return (get artist of current track) & " - " & (get name of current track) | |
else | |
return "" | |
end if |
require 'socket' | |
# 1. Create | |
# AF_INET means IPv4 (xxx.xxx.xxx.xxx) | |
# SOCK_STREAM means communicating with a stream (TCP) | |
# | |
# Can be simplified to symbols :INET and :STREAM, respectively | |
server = Socket.new(Socket::AF_INET, Socket::SOCK_STREAM) |
First, check your current config (example output in homebrew.mxcl.postgresql.plist.xml
lower down in this gist):
cat ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
Most importantly, note the -D /usr/local/var/postgres
argument.
Second, shut down your current PostgreSQL.
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
class MyJob < ActiveJob::Base | |
queue_as :urgent | |
rescue_from(NoResultsError) do | |
retry_job wait: 5.minutes, queue: :default | |
end | |
def perform(*args) | |
MyService.call(*args) | |
end |