Command Line
pry -r ./config/app_init_file.rb
- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
- load your rails into a pry session
Debugger
Command Line
pry -r ./config/app_init_file.rb
- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
- load your rails into a pry sessionDebugger
##0. Mass Assignment
Mass assignment allows us to set a bunch of attributes at once:
attrs = { :first => "John", :last => "Doe",
:email => "[email protected]"}
user = User.new(attrs)
#!/usr/bin/env -S cargo +nightly -Zscript --quiet | |
--- | |
[package] | |
edition = "2021" | |
[dependencies] | |
eyre = "0.6.12" | |
home = "0.5.9" | |
--- |
# OBJECTIVE: Install Arch Linux with encrypted root and swap filesystems and boot from UEFI. | |
# Note this encrypted installation method, while perfectly correct and highly secure, CANNOT support encrypted /boot and | |
# also CANNOT be subsequently converted to support an encrypted /boot!!! A CLEAN INSTALL will be required! | |
# Therefore, if you want to have an encrypted /boot or will want an encrypted /boot system at some point in the future, | |
# please ONLY follow my encrypted /boot installation guide, which lives here: |
import functools | |
def memoize_django_model_method(obj): | |
@functools.wraps(obj) | |
def memoizer(*args, **kwargs): | |
# Get the model instance | |
instance = args[0] |
#!/usr/bin/env bash | |
# | |
# Use rofi to pick emoji because that's what this | |
# century is about apparently... | |
# | |
# Requirements: | |
# rofi, xsel, curl, xmllint | |
# | |
# Usage: | |
# 1. Download all emoji |
Vagrant::Config.run do |config| | |
config.vm.define :default do |tw_config| | |
tw_config.vm.box = "precise64" | |
tw_config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
tw_config.vm.provision :shell, :path => "provision/ansible-setup.sh" | |
tw_config.vm.provision :shell, :path => "provision/controller-setup.sh" | |
# Load a local setup file if it exists, so you can use it to | |
# provide additional provisioning steps. |