Skip to content

Instantly share code, notes, and snippets.

View rjswenson's full-sized avatar

Robin Healey rjswenson

  • Internet Superhighway
  • USA
View GitHub Profile
@rajraj
rajraj / gist:1388849
Created November 23, 2011 14:46
Capybara Reference
# Credit: http://richardconroy.blogspot.com/2010/08/capybara-reference.html
#Navigating
visit('/projects')
visit(post_comments_path(post))
#Clicking links and buttons
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
@hiltmon
hiltmon / development_profiler.rb
Created February 28, 2012 03:55
Simple class to wrap a profile run around some code
class DevelopmentProfiler
def self.prof(file_name)
RubyProf.start
yield
results = RubyProf.stop
# Print a flat profile to text
File.open "#{Rails.root}/tmp/performance/#{file_name}-graph.html", 'w' do |file|
@bantic
bantic / bucket_sync_service.rb
Created November 15, 2012 19:47
ruby class to copy from one aws s3 bucket to another
require 'aws/s3' # gem name is 'aws-sdk'
class BucketSyncService
attr_reader :from_bucket, :to_bucket, :logger
attr_accessor :debug
DEFAULT_ACL = :public_read
# from_credentials and to_credentials are both hashes with these keys:
# * :aws_access_key_id
@dLobatog
dLobatog / linkedlists.rb
Created January 9, 2013 01:43
Coding for interviews: LinkedLists and Ruby
################
# Tasks
################
# 1. A linked list is just a collection of linked nodes.
# Each node is linked to another node, which we call "next" in a singly linked list.
# In a doubly linked list, each node is linked to a "previous" and "next" node.
# These are the constraints that define our collection of nodes as a linked list.
# Extra! : http://softwarecake.com/post/29053008425/what-is-a-linked-list :) best description ever.
@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active October 23, 2025 20:35
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@justsml
justsml / screenshot-capture-selection.sh
Created March 28, 2016 22:29
Linux/Debian Clone of Mac OSX 'Capture Screen Region' feature (map to similar Cmd+Ctrl+Shift+4)
#!/bin/bash
# Clone of Capture Screen Region on Mac OSX (map to similar Cmd-Ctrl-Shift-4)
# *** Requirements ***
# shutter - `apt-get install shutter`
# copyq - download from https://github.com/hluk/CopyQ/releases
shutter --select --no_session --exit_after_capture --output=/tmp/screenshot-surrent.png
copyq write image/png - < /tmp/screenshot-surrent.png && copyq select 0
rm /tmp/screenshot-surrent.png
@justsml
justsml / rsync options worth knowing.md
Created April 13, 2017 08:07
rsync: the good parts

Rsync is amazingly powerful

There are 100's of options for rsync

And I can't remember the options to save my life - and that man page, just goes on and on...

My cheat sheet is 99% of the important ones:

I'll add explainers and examples in a follow up.

@rjswenson
rjswenson / settings_template.md
Last active July 11, 2017 15:36
Settings Ticket template

Requirements for client settings.rb

  • client url (ex: spyn.spyder.com)
  • client platform name (ex: SPYN, Elastic)
  • Missing Images image
  • logo for pdfs
  • short client name (ex: fox)
  • long client name (ex: Fox Racing)
  • https /SSL ?
  • available on as data/info ?
@rjswenson
rjswenson / confirmer.html.erb
Last active June 5, 2017 20:24
email template for translations
Hello <%= @user.name %>,
<%= @custom_catalog.author.name %> has shared a catalog, <%= @custom_catalog.name %>, with you.
You can access this catalog from the dashboard under the "Custom Catalogs" section.
The catalog will be identified with a link icon to indicate its a shared catalog.
The shared catalog is read only. If you modify it, a new copy will be created for you
that is not linked to the shared catalog.
One of your assigned dealers, <%= @document.customer_name %> (<%= @document.author.name %>) has submitted a
@rjswenson
rjswenson / cs_dev_study_guide.txt
Created May 15, 2025 15:55
General CS Dev Study Guide for new hires
๐—•๐—ฎ๐˜€๐—ถ๐—ฐ ๐——๐—ฎ๐˜๐—ฎ-๐—ฆ๐˜๐—ฟ๐˜‚๐—ฐ๐˜๐˜‚๐—ฟ๐—ฒ๐˜€
๐˜Œ๐˜ท๐˜ฆ๐˜ณ๐˜บ๐˜ฐ๐˜ฏ๐˜ฆ ๐˜ด๐˜ฉ๐˜ฐ๐˜ถ๐˜ญ๐˜ฅ ๐˜ฌ๐˜ฏ๐˜ฐ๐˜ธ ๐˜ฉ๐˜ฐ๐˜ธ ๐˜ต๐˜ฉ๐˜ฆ๐˜บ ๐˜ธ๐˜ฐ๐˜ณ๐˜ฌ, ๐˜ธ๐˜ฉ๐˜ฆ๐˜ฏ ๐˜ต๐˜ฐ ๐˜ถ๐˜ด๐˜ฆ ๐˜ต๐˜ฉ๐˜ฆ๐˜ฎ, ๐™๐™ค๐™ฌ ๐™ฉ๐™ค ๐™ž๐™ข๐™ฅ๐™ก๐™š๐™ข๐™š๐™ฃ๐™ฉ ๐™ฉ๐™๐™š๐™ข
โ€ข Array
โ€ข Set
โ€ข Hashmap
โ€ข Linked List
โ€ข Stack
โ€ข Queue
โ€ข Tree