Skip to content

Instantly share code, notes, and snippets.

View cthiel's full-sized avatar

Christoph Thiel cthiel

  • Nürnberg, Germany
View GitHub Profile
class Phantomjs < Formula
desc "Headless WebKit scriptable with a JavaScript API"
homepage "http://phantomjs.org/"
head "https://github.com/Vitallium/phantomjs.git", :tag => '2.0.1'
stable do
url "https://github.com/ariya/phantomjs/archive/2.0.0.tar.gz"
sha256 "0a1338464ca37314037d139b3e0f7368325f5d8810628d9d9f2df9f9f535d407"
# https://github.com/Homebrew/homebrew/issues/42249
diff --git a/src/qt/qtwebkit/Source/WebCore/html/FileInputType.cpp b/src/qt/qtwebkit/Source/WebCore/html/FileInputType.cpp
index 7362f63..1a7b148 100644
--- a/src/qt/qtwebkit/Source/WebCore/html/FileInputType.cpp
+++ b/src/qt/qtwebkit/Source/WebCore/html/FileInputType.cpp
@@ -187,8 +187,9 @@ void FileInputType::handleDOMActivateEvent(Event* event)
if (element()->isDisabledFormControl())
return;
- if (!ScriptController::processingUserGesture())
- return;
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@cthiel
cthiel / assets-graphviz.rb
Created December 9, 2011 10:45
Rails 3.1 stylesheet assets dependency graph
#!/usr/bin/ruby
#
# (c) 2011 SUSE Linux Products GmbH, Author: Christoph Thiel <cthiel@suse.com>
#
# script that generate dependency graph for Rails 3.1 stylesheet assets
#
# usage: sudo rubygem install ruby-graphviz
# cp assets-graphviz.rb yourapp/app/assets/
# cd yourapp/app/assets/; chmod +x assets-graphviz.rb; ./assets-graphviz.rb
@cthiel
cthiel / Gemfile
Created September 23, 2011 09:40
Parser for Amazon EC2 Public IP Range Announcements
source :rubygems
gem 'nokogiri'
gem 'netaddr'
@cthiel
cthiel / autoyast.xml
Created June 30, 2011 11:36
SUSE Studio: Run AutoYaST profile on appliance's first boot, example 2
<?xml version="1.0"?>
<!DOCTYPE profile>
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
<general>
<ask-list config:type="list">
<ask>
<dialog config:type="integer">20</dialog>
<element config:type="integer">20</element>
<help><![CDATA[
<p><b>Virtual IP address</b><br>Enter the IP address
@cthiel
cthiel / autoyast.xml
Created June 16, 2011 11:56
SUSE Studio: Run AutoYaST profile on appliance's first boot, example 1
<?xml version="1.0"?>
<!DOCTYPE profile>
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
<general>
<ask-list config:type="list">
<ask>
<question>Enter the user for this machine</question>
<default></default>
<help>Enter your novell userID</help>
<title>userID</title>
#!/usr/bin/ruby
# German phone prefixes
# imported from
# http://www.bundesnetzagentur.de/media/archive/15493.txt
PREFIXES = %w[0201 0202 0203 02041 02043 02045 02051 02052 02053 02054 02056 02058 02064 02065 02066 0208 0209 02102 02103 02104 0211 0212 02129 02131 02132 02133 02137 0214 02150 02151 02152 02153 02154 02156 02157 02158 02159 02161 02162 02163 02164 02165 02166 02171 02173 02174 02175 02181 02182 02183 02191 02192 02193 02195 02196 02202 02203 02204 02205 02206 02207 02208 0221 02222 02223 02224 02225 02226 02227 02228 02232 02233 02234 02235 02236 02237 02238 02241 02242 02243 02244 02245 02246 02247 02248 02251 02252 02253 02254 02255 02256 02257 02261 02262 02263 02264 02265 02266 02267 02268 02269 02271 02272 02273 02274 02275 0228 02291 02292 02293 02294 02295 02296 02297 02301 02302 02303 02304 02305 02306 02307 02308 02309 0231 02323 02324 02325 02327 02330 02331 02332 02333 02334 02335 02336 02337 02338 02339 0234 02351 02352 02353 02354 02355 02357 02358 02359 02360 02361 02362 02363
@cthiel
cthiel / gist:130145
Created June 15, 2009 14:49
recode_legacy_database.rb
# RecodeLegacyDatabase
module Recode #:nodoc:
module Legacy #:nodoc:
module Database #:nodoc:
def self.included(base) #:nodoc:
base.extend ClassMethods
end
module ClassMethods