Skip to content

Instantly share code, notes, and snippets.

; Cycle between windows of the same app like in macOS - Alt+backtick.
; Original Source: https://gist.github.com/kamui/12c581c09288ac486faeb1095622c873
; Based on: https://gist.github.com/rbika/014fb3570beaef195db0bd53fa681037
; Limitations
; • It does not work in Explorer app
SendMode("Input")
SetWorkingDir(A_ScriptDir)
@kamui
kamui / cloudSettings
Last active October 6, 2020 18:07
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-10-06T18:06:58.676Z","extensionVersion":"v3.4.3"}
@kamui
kamui / keybase.md
Created November 16, 2017 12:19
Keybase

Keybase proof

I hereby claim:

  • I am kamui on github.
  • I am kamui (https://keybase.io/kamui) on keybase.
  • I have a public key ASBjD4-XEgC4bUvHqCVZEvxcr77h1oyikbdQ7UeeaPIgWAo

To claim this, I am signing this object:

@kamui
kamui / category.md
Last active May 17, 2017 21:56
Category Page

Category Page

Hierarchical header structure

Why?

  • ADA
  • SEO

Screen readers and search engines rely on header hierarchy to organize content.

@kamui
kamui / web_scrape.rb
Last active January 2, 2016 18:59
A ruby script to scrape a site for a specific dom node change. It will email you if you choose when the content changes and what the new node content changed into. Require `nokogiri` and `pony` gems. http://jackchu.com/articles/2014/01/10/web-scraping-content-changes-with-nokogiri/
require 'nokogiri'
require 'open-uri'
require 'pony'
require 'digest'
URL = 'https://encrypted.google.com/'.freeze
CSS_SELECTOR = '#lga'.freeze
INTERVAL = 600.freeze
USER_AGENT = "Ruby/#{RUBY_VERSION}".freeze
SEND_EMAIL = false
@kamui
kamui / helpers.rb
Created October 2, 2012 21:06
sentry-raven in sinatra
module Helpers
def capture_exception(e, env)
if ENV['SENTRY_DSN']
evt = Raven::Event.capture_rack_exception(e, env)
Raven.send(evt) if evt
end
end
end
@kamui
kamui / restrictedcolumn.rb
Created August 14, 2012 22:13
/gems/sequel-3.38.0/lib/sequel/model/base.rb:1756:in `block in set_restricted': shopper is a restricted column (Sequel::Error)
# You just need sequel, fabrication, ffaker, and sqlite3 gems
require 'sequel'
require 'sqlite3'
require 'logger'
require 'fabrication'
require 'ffaker'
DB = Sequel.sqlite
# DB.loggers << Logger.new($stdout)
@kamui
kamui / nested_attributes_many_to_one_validation.rb
Created July 19, 2012 20:07
nested_attributes and many_to_one relationship validation
require 'sequel'
require 'sqlite3'
require 'logger'
DB = Sequel.sqlite
# DB.loggers << Logger.new($stdout)
Sequel::Model.plugin :validation_helpers
Sequel::Model.raise_on_save_failure = false
@kamui
kamui / nested_attributes_validation.rb
Created June 28, 2012 23:57
nested_attributes in a one_to_many relationship with a presence validation on the parent model
require 'sequel'
require 'sqlite3'
require 'logger'
require 'pry'
DB = Sequel.sqlite
DB.loggers << Logger.new($stdout)
Sequel::Model.plugin :validation_helpers
@kamui
kamui / bundler_issue1937.md
Created May 21, 2012 20:44
bundler issue #1937

I was running guard and here's the specific backtrace, although it might not help since it's specific to my testing setup:

Running: test/functional/signups_controller_test.rb
/Users/JackC/.rvm/gems/ruby-1.9.3-p194@kickpuncher/gems/minitest-3.0.0/lib/minitest/spec.rb:68:in `describe': undefined method `create' for ActionController::TestCase:Class (NoMethodError)
	from /Users/JackC/Development/kickpuncher/test/functional/signups_controller_test.rb:3:in `<top (required)>'
	from -e:in `require'

Gemfile: