class User < ObjectJSONMapper::Base
delegate :name, to: :local
end
User.find(1).name
# GET http://localhost:3000/users/1
# SELECT * FROM users WHERE id = 1 LIMIT 1
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
| #!/usr/bin/env bash | |
| # | |
| # Bootstrap script for setting up a new macOS machine | |
| # This should be idempotent so it can be run multiple times. | |
| echo "Starting bootstrapping" | |
| # Check for Homebrew, install if we don't have it | |
| if test ! $(which brew); then | |
| echo "Installing homebrew..." |
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
| #!/bin/bash | |
| # IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it! | |
| # IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS. | |
| # This script needs to be run from the volume you wish to use. | |
| # E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh | |
| # 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 |
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
| function _getLabel() { | |
| var label_text = "Wacht op antwoord"; | |
| var label = GmailApp.getUserLabelByName(label_text); | |
| return label; | |
| } | |
| function removeLabel() { | |
| var label = _getLabel(); | |
| var threads = GmailApp.search('label:Wacht-op-antwoord'); | |