I hereby claim:
- I am nicnilov on github.
- I am nicnilov (https://keybase.io/nicnilov) on keybase.
- I have a public key whose fingerprint is E874 E06B A8E0 4F88 D634 417E 673F BE4F 14A9 B008
To claim this, I am signing this object:
| # | |
| # Created by Felipe Machado - 2016/02/14 | |
| # | |
| # A retry command for bash | |
| # Retries the given command up to MAX_RETRIES, with an interval of SLEEP_TIME | |
| # between each retry. Just put it on your bash_profile and be happy :) | |
| # Usage: | |
| # retry [-s SLEEP_TIME] [-m MAX_RETRIES] COMMAND_WITH_ARGUMENTS | |
| # | |
| # Codes used as reference: |
| #!/bin/bash | |
| DB_SCHEMA="public" | |
| DB_USER="postgres" | |
| DB_HOST="localhost" | |
| DB_PORT="db_port" | |
| DB_NAME="db_name" | |
| # DB_PASS="" to be passed from shell | |
| psql "postgresql://$DB_USER:$DB_PASS@$DB_HOST:$DB_PORT/$DB_NAME" -Atc "select tablename from pg_tables where schemaname='$DB_SCHEMA'" $DB_NAME |\ |
| pg_ctl -D /usr/local/var/[email protected] start | |
| pg_ctl -D /usr/local/var/[email protected] stop |
| mg_client = Mailgun::Client.new('api-key') | |
| message_params = { | |
| from: '[email protected]', | |
| to: '[email protected]', | |
| subject: 'The Ruby SDK is awesome!', | |
| text: 'It is really easy to send a message!' | |
| } | |
| mg_client.send_message('mg.registered.domain', message_params) |
| #!/bin/bash | |
| # IMPORTANT: You will need to disable SIP aka Rootless in order to fully execute this script, you can reenable it after. | |
| # WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars. | |
| # Get active services: launchctl list | grep -v "\-\t0" | |
| # Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents | |
| # Agents to disable | |
| TODISABLE=('com.apple.security.keychainsyncingoveridsproxy' 'com.apple.personad' 'com.apple.passd' 'com.apple.screensharing.MessagesAgent' 'com.apple.CommCenter-osx' 'com.apple.Maps.mapspushd' 'com.apple.Maps.pushdaemon' 'com.apple.photoanalysisd' 'com.apple.telephonyutilities.callservicesd' 'com.apple.AirPlayUIAgent' 'com.apple.AirPortBaseStationAgent' 'com.apple.CalendarAgent' 'com.apple.DictationIM' 'com.apple.iCloudUserNotifications' 'com.apple.familycircled' 'com.apple.familycontrols.useragent' 'com.apple.familynotificationd' 'com.apple.gamed' 'com.apple.icloud.findmydeviced.findmydevi |
| brew search postgres | |
| brew uninstall postgresql | |
| brew install [email protected] | |
| brew link [email protected] --force | |
| pg_ctl -D /usr/local/var/postgres/ start # << specify the existing data directory and not the newly installed one |
I hereby claim:
To claim this, I am signing this object:
| SELECT "customers".* | |
| FROM ( | |
| SELECT "customers".* | |
| FROM "customers" | |
| WHERE "customers"."company_id" = $1 | |
| AND ( | |
| NOT ( | |
| EXISTS ( | |
| SELECT "import_logs".* | |
| FROM "import_logs" |