I hereby claim:
- I am johnd on github.
- I am semanticist (https://keybase.io/semanticist) on keybase.
- I have a public key ASBUJ0_KNxWIw9H6ue8WuA4w0lxDihv9_3lNS4apAK4FJAo
To claim this, I am signing this object:
| #!/usr/bin/env bash -e | |
| # | |
| # Copyright 2022 John Daniels <[email protected]> | |
| # | |
| # Usage of the works is permitted provided that this instrument is retained | |
| # with the works, so that any entity that uses the works is notified of this | |
| # instrument. | |
| # DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. | |
| # This script is intended to add a woooooooop sound to short vidoes. |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| while /usr/bin/curl -s "http://www.myvue.com/latest-movies/info/cinema/Edinburgh%20Ocean%20Terminal/film/doctor-who-the-day-of-the-doctor-3d" | /usr/bin/grep "Sorry, there are no times" | |
| do | |
| echo "nope" | |
| done | |
| echo "yup" |
| john@SLAB:~/Dropbox/Code$ rvm all --verbose do ruby explict_implicit_bm.rb | |
| jruby-1.6.5: jruby 1.6.5 (ruby-1.8.7-p330) (2011-10-25 9dcd388) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_51) [darwin-x86_64-java] | |
| Rehearsal -------------------------------------------- | |
| explicit 0.397000 0.000000 0.397000 ( 0.368000) | |
| implicit 0.339000 0.000000 0.339000 ( 0.339000) | |
| ----------------------------------- total: 0.736000sec | |
| user system total real | |
| explicit 0.340000 0.000000 0.340000 ( 0.340000) | |
| implicit 0.355000 0.000000 0.355000 ( 0.355000) |
| require 'rubygems' | |
| require 'nokogiri' | |
| require 'open-uri' | |
| URL = "http://www.dixons.co.uk/gbuk/r/touchpad/0_0_0/" | |
| SELECTOR = ".prd-amount strong" | |
| TARGET_PRICE = "89" |
| case "$UID" in | |
| 0) | |
| user_colour="00;31" | |
| ;; | |
| *) | |
| user_colour="00;36" | |
| ;; | |
| esac | |
| case "$TERM" in |
| class Article < ActiveRecord::Base | |
| after_validation :ensure_no_published_at_dates_in_the_future | |
| # ... | |
| private | |
| def ensure_no_published_at_dates_in_the_future | |
| self.published_at = Date.today if self.published_at > Date.today | |
| end |
| module Mod | |
| def my_accessor(field) | |
| @my_attributes ||= Array.new | |
| Mod.add_all_attributes(field) | |
| attr_accessor field | |
| @my_attributes << field | |
| end | |
| class Configuration | |
| attr_accessor :tail_logs, :max_connections, :admin_password | |
| def app_server(&block) | |
| @app_server_config ||= AppServer.new | |
| block.call @app_server_config if block_given? | |
| @app_server_config | |
| end | |
| end |