# Exec inside studio
hab pkg exec myorigin/package <binary> <flags>
This file contains 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
// I got tired of checking the webpage periodically. | |
var webPage = require('webpage'); | |
var page = webPage.create(); | |
page.onConsoleMessage = function(msg) { | |
console.log(msg); | |
} | |
page.open('http://www.memoryexpress.com/Products/MX64875', function(status) { |
This file contains 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
# config/application.rb | |
class Application < Rails::Application | |
console do | |
console_settings = File.join(Rails.root, "lib/console.rb") | |
if File.exists?(console_settings) | |
puts "Loading lib/console.rb ..." | |
ARGV.push "-r", root.join("lib/console.rb") | |
end | |
end |
You could have postgre installed on localhost with password (or without user or password seted after instalation) but if we are developing we really don't need password, so configuring postgre server without password for all your rails project is usefull.
- postgresql
- postgresql-client
- libpq-dev
This file contains 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 | |
# Production Docker Host Hardening Script v2 | |
# For Ubuntu Server 24.04 LTS (Noble) | |
# Suitable for both Kamal deployment and builder hosts | |
set -euo pipefail | |
IFS=$'\n\t' | |
# --- Constants --- |
OlderNewer