Skip to content

Instantly share code, notes, and snippets.


Frank Kany kany

  • Rickman, TN
View GitHub Profile
kany / pagination_controller.js
Created Jun 4, 2021 — forked from dhh/pagination_controller.js
HEY's Stimulus Pagination Controller
View pagination_controller.js
ERB template chunk from The Feed's display of emails:
<section class="postings postings--feed-style" id="postings"
data-controller="pagination" data-pagination-root-margin-value="40px">
<%= render partial: "postings/snippet", collection: @page.records, as: :posting, cached: true %>
<%= link_to(spinner_tag, url_for(page: @page.next_param),
class: "pagination-link", data: { pagination_target: "nextPageLink", preload: @page.first? }) unless @page.last? %>
View Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver).md

Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

This guide will walk you through the steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest.


This guide assumes that you are using the following setup:

You could still make this guide work with other setups (possibly with some modifications to the commands and whatnot).


Rails 5 and ActionCable

Assumptions: The application already exists. You have two models article.rb and comment.rb. Articles have two attributes, title and text. Comments have two attributes, text and article_id. See these instructions if you need help getting started.


Assuming that you are nesting your :comments resources inside of :articles, mount ActionCable and make sure you have a root.


Rails.application.routes.draw do
kany / index.txt
Created Dec 30, 2015 — forked from gus/index.txt
Ruby/Clojure analogs
View index.txt
For each Ruby module/class, we have Ruby methods on the left and the equivalent
Clojure functions and/or relevant notes are on the right.
For clojure functions, symbols indicate existing method definitions, in the
clojure namespace if none is explicitly given. clojure.contrib.*/* functions can
be obtained from,
ruby-to-clojure.*/* functions can be obtained from the source files in this
If no method symbol is given, we use the following notation:
View resque.rake
# see - old version
# see
# see - new commands
namespace :resque do
desc "Clear pending tasks"
task :clear => :environment do
queues = Resque.queues
queues.each do |queue_name|
puts "Clearing #{queue_name}..."
mkdir -p ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/CoffeeScript
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/CoffeeScript
curl -O
curl -O