Skip to content

Instantly share code, notes, and snippets.

View jtallant's full-sized avatar

Justin Tallant jtallant

View GitHub Profile
jtallant /
Created February 22, 2021 18:11
Importing ES6 Classes


export default class AppLazyLoad {
    init() {
        console.log('do lazy load work');


jtallant / justin.zsh-theme
Last active February 6, 2021 04:42
ZSH Theme
# vim:ft=zsh ts=2 sw=2 sts=2
# agnoster's Theme -
# A Powerline-inspired theme for ZSH
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](
jtallant / choose-adventure-helper.rb
Created December 13, 2016 22:37
Choose your own adventure Ruby helper
class Choice
attr_reader :text
attr_reader :decision_a
attr_reader :decision_b
def initialize(text, decision_a, decision_b)
@text = text
@decision_a = decision_a
@decision_b = decision_b
jtallant /
Last active December 12, 2016 19:28
Mass Assignment

// app/views/users/edit.html.erb

<form action="/users/1" method="POST">
    <input type="hidden" name="_method" value="PUT"
    <input type="text" name="username" value="jtallant">
    <input type="email" name="email" value="">
    <textarea name="bio">Bio goes here</textarea>
jtallant /
Last active March 25, 2024 13:26
Setting up Sinatra with Active Record

Setting up Sinatra Project

create an empty project and add a Gemfile

cd ~/Desktop
mkdir project-name
cd project-name
touch Gemfile
jtallant / routeaf.php
Created April 13, 2016 16:21
Route::get('projects/messages', function() {
$data = [
'messages' => [
'title' => 'Sidebar is cut off',
'author' => ['name' => 'John Doe', 'email' => '']
return view('projects.messages', $data); # views/projects/messages.twig
jtallant / doctrine-fk.php
Created February 25, 2016 22:22
Doctrine Foreign Key Management
class Post
public function addComment(Comment $comment)
jtallant / acl.php
Last active February 12, 2016 23:05
ACL Interface
interface AccessControl
public function userCan($action);
class BitmaskAccessControl implements AccessControl
public function userCan($action)


Feature: Send a screenshot when an issue is submitted.

Analyzing the feature:

A screenshot of an issue helps the developer/pm recognize the issue. The screenshot could help isolate the problem which will help ensure the problem is correctly recognized and fixed. The screenshot could also help the developer fix the bug faster and reduce communication time.

The requested feature says to just send one image with the issue. The image is a screenshot of whatever page the user was on when they submitted the issue.

Even though the feature only asks for one screenshot. It's very possible that users will eventually want to attach multiple images to an issue. These images could be attached in different locations with different methods. Maybe users will want to attach more images to an issue through the dispatch web UI. Maybe users will eventually want to attach multiple images through the embedded widget.

Now we need to decide if we should code the feature with the ability to have multiple image

jtallant /
Last active November 20, 2015 21:25
html2canvas($('#content'), {
    onrendered: function(canvas) {
        var dataURL = canvas.toDataURL();
        var posting = $.post(BASE + '/profiles/' + site_id + '/send-report-emails', {
            emails: emails,
            message: message,
            data_uri: dataURL