This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var rules = [{ | |
"name": "The default rule", | |
"url": "https://form-o-fill.github.io/tutorial/tour-1.html", | |
"autorun": true, | |
"before": function(resolve, context) { | |
console.warn("Rule manually triggered? %s", context.state.ruleManuallyTriggered); | |
console.warn("Rule automatically triggered? %s", context.state.ruleAutomaticallyTriggered); | |
console.warn("Rule part of workflow? %s", context.state.ruleRunningInWorkflow); | |
resolve(); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Since this is a Angular1 add don't use "autorun" since the app won't | |
// be completely initialized when Form-O-Fill runs. | |
// If you must use "autorun" please check "Match rules only when all assets are loaded" in settings :) | |
// or use "content" matching and "automatic rematch". | |
var rules = [{ | |
"url": "https://secure.sonnet.ca/#/quoting/auto/vehicle_details", | |
"name": "https://secure.sonnet.ca/#/quoting/auto/vehicle_details", | |
"fields": [{ | |
// #month-1Option0 = January, #month-1Option1 = February, ... | |
"selector": "#month-1Option0", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var rules = [{ | |
"url": "https://www.amazon.com/gp/help/reports/infringement", | |
"name": "Amazon - Report Infringments", | |
"before": function(resolve) { | |
var asinsInput = prompt("Enter a comma or newline sep. list of ASINS"); | |
var asins = asinsInput.trim().split(/[\t\n,]/); | |
resolve(asins); | |
}, | |
"fields": [{ | |
"selector": "#inputASIN", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var rules = [{ | |
// Go to https://www.amazon.com/s/ref=nb_sb_noss_2?url=search-alias%3Daps&field-keywords=rainbow+pony | |
// URL parameters are: url=search-alias%3Daps&field-keywords=rainbow+pony | |
"url": /www.amazon.com/, | |
"name": "Demo : Extract parameters from URL", | |
"fields": [{ | |
"selector": "input[name=field-keywords]", | |
"value": function($element) { | |
// Construct via this nice helper : https://developer.mozilla.org/de/docs/Web/API/URLSearchParams | |
var params = new URLSearchParams(window.location.search); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Hash | |
def deep_transform_values(&block) | |
_deep_transform_values_in_object(self, &block) | |
end | |
def deep_transform_values!(&block) | |
_deep_transform_values_in_object!(self, &block) | |
end | |
def deep_find(key) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rake/tasklib" | |
class CopyToAppRakeTask < ::Rake::TaskLib | |
attr_accessor :app | |
def initialize(app = nil) | |
self.app = app | |
define | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/it.baeyens.arduino.core/src/it/baeyens/arduino/toolchain/ArduinoGnuMakefileGenerator.java b/it.baeyens.arduino.core/src/it/baeyens/arduino/toolchain/ArduinoGnuMakefileGenerator.java | |
index 8921518..dac70d7 100644 | |
--- a/it.baeyens.arduino.core/src/it/baeyens/arduino/toolchain/ArduinoGnuMakefileGenerator.java | |
+++ b/it.baeyens.arduino.core/src/it/baeyens/arduino/toolchain/ArduinoGnuMakefileGenerator.java | |
@@ -5,6 +5,7 @@ import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.io.Reader; | |
+import java.lang.Exception; | |
import java.util.ArrayList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var rules = [{ | |
// This demonstrates: | |
// - usage of setupContent | |
// - usage of context.storage in setupContent/teardownContent/value function | |
// - the fact that all three functions have the same context available | |
"url": /20-teardown-content/, | |
"name": "Teardown content function", | |
"setupContent": function() { | |
context.storage.set("setBySetupContent", "setBySetupContent"); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl genrsa -out privkey.pem 768 | |
openssl pkcs8 -topk8 -nocrypt -in privkey.pem -out privkey2.pem |