Skip to content

Instantly share code, notes, and snippets.

Selenium with Python

Author: Baiju Muthukadan
Email:baiju.m.mail AT gmail.com
Version: 0.3.2
@daemianmack
daemianmack / rails_engines.md
Created July 20, 2012 16:44 — forked from westonplatter/controller_to_be_included.rb
using ActiveSupport::Concerns to extend Rails

Gist to describe the process of adding a namespaced isolated Rails Engine
to a typical Rails application and adding methods to one of the Rails Engine's
controller and model.

Index

  1. Rails applicaiton all by itself.
  2. Rails application with the Rails Engine (FooBar) mounted.
  3. Rails applicaiton partially extending a controller/model from the Rails Engine.
@daemianmack
daemianmack / flow-charts-in-org-mode
Last active May 11, 2020 18:18
Generating a flow chart in org-mode
;; Using org-mode to describe state transitions with embedded elisp to
;; emit those state transitions as a graphical flow-chart via dot
;;
;; Modified with minor improvements from https://orgmode.org/worg/org-tutorials/org-dot-diagrams.html
;;
;; Place cursor in elisp code-block, eval with `C-c C-c`.
#+NAME: nodes
| *node* | *label* | *shape* | *fillcolor* | fg |
|-----------------------------+------------------------------------+---------+----------------+-------|
@daemianmack
daemianmack / keybase.md
Created September 4, 2018 18:02
keybase.md

Keybase proof

I hereby claim:

  • I am daemianmack on github.
  • I am daemianmack (https://keybase.io/daemianmack) on keybase.
  • I have a public key ASBZsZGf8hZMjhky1EhdpMx66syKxnW9y1YYQyHwC8xGdgo

To claim this, I am signing this object:

@daemianmack
daemianmack / hack-system.clj
Created June 19, 2017 19:36
Wrap the dev-system
;; I use this to wrap the `dev-system` in a way that...
;; - Alerts me when the system launch completes so I can do something
;; else while waiting, without getting sidetracked
;; - Alerts me when the system launch hangs
;; - Runs Eastwood
;; - Squelches logging from namespaces whose logging statements
;; frequently mask the logging I'm trying to see
;; I put this in ./dev and then
;; `printf ":/Users/daemian/src/ww/elephant/dev" >> build/cached-classpath`
@daemianmack
daemianmack / gist:3692024
Created September 10, 2012 16:41
Clojure Problem of the Day #9
(ns clj.core)
(def nums
(range 0 10))
(defn fair []
(rand-nth nums))
@daemianmack
daemianmack / gist:3385630
Created August 18, 2012 09:30
org chart scrape-builder from FM
require 'rubygems'
require 'set'
require 'hpricot'
require 'mechanize'
USER_ACCOUNT = "dmack@federatedmedia.net"
PASSWORD = ARGV[0]
MAX_LINKS = 200
SLEEP_INTERVAL = 0.5
class Regular(object):
def __init__(self):
self.num = self.caller(5)
def not_inner(self, x):
return x * x
def caller(self, num):
return self.not_inner(num)
@daemianmack
daemianmack / ns-cheatsheet.clj
Created July 8, 2012 13:42 — forked from ghoseb/ns-cheatsheet.clj
Clojure ns syntax cheat-sheet
;;
;; NS CHEATSHEET
;;
;; * :require makes functions available with a namespace prefix.
;;
;; * :use makes functions available without a namespace prefix
;; (i.e., refers functions to the current namespace).
;;
;; * :import refers Java classes to the current namespace.
;;
@daemianmack
daemianmack / rubyuse.rb
Created May 5, 2012 01:55 — forked from alandipert/rubyuse.rb
A different way to organize Ruby code
class Ns
def initialize
use.each do |pkg, method_names|
method_names.each do |name|
self.class.send(:define_method, name) do |*args|
pkg.method(name).call(*args)
end
end
end
end