+ MacVim
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
// | |
// Shodan Generate IP List Example | |
// Generation of an "IP List" using the Objective-C Shodan API | |
// | |
// main.m | |
// shodan_ips | |
// | |
// Created by Erran Carey on 6/10/12. | |
// Copyright (c) 2012 App2O. All rights reserved. | |
// |
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
# Git | |
function git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\u @ \w \$(git_branch)$ " |
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 'ipaddr' | |
unless defined?(IPAddr::InvalidRangeError) | |
IPAddr::InvalidRangeError = Class.new(ArgumentError) | |
end | |
String.class_eval do | |
def to_ip_range | |
if split('-').count == 2 | |
IPAddr.new(split('-').first)..IPAddr.new(split('-').last) |
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
[ecarey @ automation]$ cucumber-jvm | |
cucumber.runtime.CucumberException: java.lang.reflect.InvocationTargetException | |
at cucumber.runtime.io.ResourceLoaderReflections.newInstance(ResourceLoaderReflections.java:81) | |
at cucumber.runtime.io.ResourceLoaderReflections.instantiateSubclasses(ResourceLoaderReflections.java:57) | |
at cucumber.runtime.Runtime.loadBackends(Runtime.java:78) | |
at cucumber.runtime.Runtime.<init>(Runtime.java:52) | |
at cucumber.api.cli.Main.run(Main.java:18) | |
at cucumber.api.cli.Main.main(Main.java:12) | |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) |
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
[ecarey @ automation]$ RUBY_VERSION=2.0 jruby -S cucumber-jvm -g features/ features/ | |
NoMethodError: undefined method `Given' for main:Object | |
(root) at ui/step_definitions/prototype.rb:1 | |
(root) at /Users/ecarey/.rvm/gems/jruby-1.7.4/gems/cucumber-jvm-1.1.4-java/bin/cucumber-jvm:7 | |
load at org/jruby/RubyKernel.java:1073 | |
(root) at /Users/ecarey/.rvm/gems/jruby-1.7.4/bin/cucumber-jvm:19 | |
org.jruby.embed.EvalFailedException: (NoMethodError) undefined method `Given' for main:Object | |
at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java:133) | |
at org.jruby.embed.ScriptingContainer.runUnit(ScriptingContainer.java:1264) | |
at org.jruby.embed.ScriptingContainer.runScriptlet(ScriptingContainer.java:1280) |
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
<!DOCTYPE html> | |
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en-US"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en-US"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]--> | |
<head> | |
<meta http-equiv="set-cookie" content="cf_use_ob=0; expires=Sat, 24-Aug-13 21:48:25 GMT; path=/"> |
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/env ruby | |
# vi: set ft=ruby | |
require 'json' | |
Dir['**/*.json'].each do |json| | |
puts json | |
JSON.parse(File.read(json)) | |
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
JSON.parse(json) == YAML.parse(json).to_ruby |
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/env ruby | |
# vi: set ft=ruby : | |
require_relative './nexpose-console.rb' | |
nsc = Nexpose::Console.new({ :host => ARGV[0] }) | |
nsc.scan({ :scan_template => 'full-audit', :site_id => 1 }) |
OlderNewer