Skip to content

Instantly share code, notes, and snippets.

View emptyflask's full-sized avatar

Jon Roberts emptyflask

View GitHub Profile
@narath
narath / readme.md
Created July 8, 2021 10:35
Deploying Sidekiq to Ubuntu as a systemctl service using capistrano-sidekiq

I struggled to deploy sidekiq to an Ubuntu 20.04 server using the capistrano-sidekiq gem. Here are the steps I took to get it to work

Add to your Gemfile

gem 'sidekiq', '~> 6.2'

Add to the development group of your gemfile

@ryanb
ryanb / 1_create_nodes_migration.rb
Last active February 27, 2024 13:14
A variation of closure_tree with support for multiple parents
class CreateNodes < ActiveRecord::Migration[6.0]
def change
create_table :nodes do |t|
end
create_table :node_edges do |t|
t.integer :parent_id, null: false
t.integer :child_id, null: false
end
# Copyright 2018 Stanko K.R. <me@stanko.io>
#
# Permission is hereby granted, free of charge, to any
# person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the
# Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute,
# sublicense, and/or sell copies of the Software, and to permit
# persons to whom the Software is furnished to do so, subject
# to the following conditions:
@chshersh
chshersh / ghci.conf
Last active December 5, 2023 00:19
Config for GHCi with pretty output
-- To run:
-- cabal repl -b pretty-simple
--
-- Colorizing and pretty-printing ghci output
-- requires: pretty-simple
:set -interactive-print=Text.Pretty.Simple.pPrint
-- green bold lambdas and multiline mode
:set prompt "\ESC[1;32mλ: \ESC[m"
:set prompt-cont "\ESC[1;32mλ| \ESC[m"
@HardenedArray
HardenedArray / Efficient Encrypted UEFI-Booting Arch Installation
Last active October 22, 2023 12:14
An effcient method to install Arch Linux with encrypted root and swap filesystems and boot from UEFI. Multi-OS, and VirtualBox, UEFI-booting are also supported.
# 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:
@rehno-lindeque
rehno-lindeque / NixSetup.md
Last active April 2, 2024 20:18
NixOS Setup (Virtualized + Haskell + Gnome3 + XMonad)

Setup NixOS (Virtualized + Haskell + Gnome3 + XMonad)

Before you get started

This is pretty out of date now... you may want to look elsewhere

Newer guides than mine (mine is a bit dated and has a lot of rough edges):

Have you looked at these?

@xbeta
xbeta / README.md
Last active May 3, 2024 14:04
Macbook Pro Bluetooth + WiFi 2.4GHz interference fix for Mavericks
@dustMason
dustMason / gist:1252515
Created September 30, 2011 02:34
Fix precompilation DB dependency
namespace :assets do
# Prepend the assets:precompile_prepare task to assets:precompile.
task :precompile => :precompile_prepare
# This task will be called before assets:precompile to optimize the
# compilation, i.e. to prevent any DB calls.
task 'precompile_prepare' do
# Without this assets:precompile will call itself again with this var set.
# This basically speeds things up.
# ENV['RAILS_GROUPS'] = 'assets'
# How to re-use the menu partial for a submenu in Refinery CMS >= 0.9.8.5 and < 0.9.9.22
# header menu (main menu) which hides its children.
<%= render :partial => "/shared/menu",
:locals => {
:dom_id => 'menu',
:css => 'menu',
:collection => @menu_pages,
:hide_children => true
} -%>