Skip to content

Instantly share code, notes, and snippets.

@kaze
kaze / fix_update_bundle.patch
Created October 1, 2011 18:21
Fixes problem with updating bundles in thor
---
lib/thor/runner.rb | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
create mode 100644 fix_update_bundle.patch
diff --git a/lib/thor/runner.rb b/lib/thor/runner.rb
index 18c63c4..1eef304 100644
--- a/lib/thor/runner.rb
+++ b/lib/thor/runner.rb
@@ -126,7 +126,17 @@ class Thor::Runner < Thor #:nodoc:
@kaze
kaze / gist:1501752
Created December 20, 2011 14:34
sample bashrc
#! /bin/bash
# --------------------------------------------------------------------------- #
# karakterkészlet
# --------------------------------------------------------------------------- #
export LC_CTYPE=hu_HU.UTF-8
export LC_ALL=hu_HU.UTF-8
# localedef -v -c -i hu_HU -f UTF-8 hu_HU.UTF-8
# --------------------------------------------------------------------------- #
@kaze
kaze / vimrc.local
Created December 20, 2011 15:19
local vimrc
"Supress ruby warnings in command-line mode
let g:LustyJugglerSuppressRubyWarning = 1
let g:speckyBannerKey = "<C-S>b"
let g:speckyQuoteSwitcherKey = "<C-S>'"
let g:speckyRunRdocKey = "<C-S>r"
let g:speckySpecSwitcherKey = "<C-S>x"
let g:speckyRunSpecKey = "<Leader>s"
let g:speckyRunSpecCmd = "rspec -fs"
let g:speckyRunRdocCmd = "fri -L -f plain"
# A formtastic input which incorporates carrierwave uploader functionality.
#
# Intelligently adds the cache field, displays and links to the current
# value if there is one, adds a class to the wrapper when replacing an
# existing value, allows removing an existing value with the checkbox
# taking into account validation requirements.
#
# There are several options:
#
# * Toggle the replacement field with `replaceable: true/false`.
@kaze
kaze / README.md
Created August 6, 2013 11:49 — forked from sj26/README.md

RSpec ExampleGroup extensions for CarrierWave

Infers as much as possible about uploader—the model class, what it's mounted as, etc—, sets up an uploader for specs, handles dis/enabling processing for only uploader specs, and makes it easy to describe behaviour of versions.

Drop it in spec/support/carrierwave.rb or something similar.

TODO: Microgem coming, can't get it all loading in the right order.

@kaze
kaze / selenium-install
Last active May 17, 2024 12:12 — forked from xiaol825/install.txt
How to install Chrome, ChromeDriver and Selenium on CentOS. Plus a sample scraping script.
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`
@kaze
kaze / machine.js
Last active February 11, 2020 21:10
Generated by XState Viz: https://xstate.js.org/viz
class APIError extends Error {
constructor (response, details = {}) {
super(`Received response with ${response.status} status code when asking for ${response.url}`);
this.name = "APIError";
this.response = response;
this.details = details;
}
}
const build_url = (endpoint) => {
@kaze
kaze / cloudSettings
Last active August 2, 2020 08:00
Generated by XState Viz: https://xstate.js.org/viz
{"lastUpload":"2020-08-02T08:00:33.722Z","extensionVersion":"v3.4.3"}
@kaze
kaze / machine.js
Last active September 14, 2020 04:45
Generated by XState Viz: https://xstate.js.org/viz
const login_activate_signal = 'login.activate';
const login_deactivate_signal = 'login.deactivate';
const register_activate_signal = 'register.activate';
const register_deactivate_signal = 'register.deactivate';
const send_activate_login = () => {
send({ type: login_activate_signal })
};
const send_deactivate_login = () => {
@kaze
kaze / machine.js
Last active September 7, 2020 13:29
Generated by XState Viz: https://xstate.js.org/viz
const resend_confirmation_machine = {
id: 'resendconfirmation',
initial: 'inactive',
states: {
inactive: {
always: '#loginform.active',
},
active: {
on: {
'resendconfirmation.email.focus': 'email',