Skip to content

Instantly share code, notes, and snippets.

View daveshah's full-sized avatar
💭
💻

Dave Shah daveshah

💭
💻
View GitHub Profile
@LostKobrakai
LostKobrakai / form_live.ex
Last active June 19, 2024 02:18
Phoenix LiveView form with nested embeds and add/delete buttons
defmodule NestedWeb.FormLive do
use NestedWeb, :live_view
require Logger
defmodule Form do
use Ecto.Schema
import Ecto.Changeset
embedded_schema do
field :name, :string
@mjm
mjm / LinkedText.swift
Created May 21, 2020 03:56
Tappable links in SwiftUI Text view
import SwiftUI
private let linkDetector = try! NSDataDetector(types: NSTextCheckingResult.CheckingType.link.rawValue)
struct LinkColoredText: View {
enum Component {
case text(String)
case link(String, URL)
}
@DoggettCK
DoggettCK / pdf_grammar.ex
Created May 11, 2016 15:57
Preliminary Neotomex PDF object grammar. Still has some bugs around object name edge cases.
defmodule PdfObjectGrammar do
use Neotomex.ExGrammar
defp describe_object(o, prefix) do
IO.puts "#{prefix} received"
IO.inspect o
end
@root true
define :object, "bool / numeric_object / string_object / name / array / dictionary"
@daveshah
daveshah / tracking-happiness.md
Created May 10, 2016 14:37
Just some quick notes/thoughts on tracking happiness :)

##Some quick thoughts on tracking happiness I've done this with a couple of teams. I've used Mercury App and Google Forms.

Some things I've learned from this:

  • Setting expectations is important - we're going to have good and bad days - that's okay. That's human.
  • It's important to PAY ATTENTION and HONESTLY AND OPENLY discuss the reasons we're happy / unhappy. (make sure there's room for notes)
  • It's important to remember balance - making one group happy can easily make another one unhappy. Be mindful of the impact of our actions in a larger context!
  • IMO, as with all metrics, this is one the team should own.
  • This definitely takes discipline. It's easy to forget to track things. Try and set a calendar reminder (or similiar) to take 5 minutes or so and keep this habit.
@staltz
staltz / introrx.md
Last active June 29, 2024 02:36
The introduction to Reactive Programming you've been missing
@madansr
madansr / getFileExtensions
Created November 20, 2013 17:49
Get a list of all file extensions in a directory.
find . -type f | awk -F'.' '{print $NF}' | sort| uniq -c | sort -g
@leviwilson
leviwilson / codmash_abstract_2013.md
Last active March 30, 2018 21:03
Abstract for Codemash 2014: Automating Windows Applications with Ruby.

Codemash 2014 Pre-Compiler

Automating Windows Applications with Ruby

Abstract

When we think of writing automated tests with ruby and cucumber, Windows desktop applications are not the first thing that come to mind. If you have looked into writing acceptance tests for Windows applications (native, WinForms or WPF), chances are you have come across solutions such as SpecFlow or Raconteur, but what are the options if we want to drive our tests from ruby using cucumber or RSpec?

This pre-compiler session will take you through building an acceptance test suite using some ruby gems (mohawk, RAutomation and cucumber) that tap into the Microsoft UI Automation accessibility framework to automate native, WinForms and WPF applications.

Target Audience

@digitaljhelms
digitaljhelms / gist:4287848
Last active June 28, 2024 13:53
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@imeredith
imeredith / openid.scala
Created November 16, 2012 02:30
Play2 OpenId4Java
package controllers
import play.api.mvc.Action
import play.api.mvc.Controller
import play.api.mvc.AsyncResult
import views.html.index
import play.api.libs.openid.OpenID
import play.api.libs.concurrent.Redeemed
import play.api.libs.concurrent.Thrown
import play.api._
@caniszczyk
caniszczyk / clone-all-twitter-github-repos.sh
Created October 9, 2012 04:25
Clone all repos from a GitHub organization
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'