Skip to content

Instantly share code, notes, and snippets.

Anthony Scotti amscotti

Block or report user

Report or block amscotti

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am amscotti on github.
  • I am amscotti (https://keybase.io/amscotti) on keybase.
  • I have a public key whose fingerprint is 94CF B82F CB07 8C92 0B26 DFE6 7C2E 402D 612A 33C3

To claim this, I am signing this object:

View wow_xml.groovy
def realm = URLEncoder.encode("Staghelm")
def guild = URLEncoder.encode("Controlled Chaos")
def url = "http://www.wowarmory.com/guild-info.xml?r=${realm}&n=${guild}".toURL()
def types = [
"1": "Warrior", "2": "Paladin", "3": "Hunter",
"4": "Rogue", "5": "Priest", "6": "Death Knight",
"7": "Shaman", "8": "Mage", "9": "Warlock",
"11": "Druid"].withDefault { key -> "unknown" }
View wow_xml.ruby
require 'net/http'
require 'rexml/document'
include REXML
def get_xml_page(strRealm, strGuildName)
oresp = Net::HTTP.start( "www.wowarmory.com") do |http|
http.get( "/guild-info.xml?r=#{strRealm}&n=#{strGuildName}",
{ 'user-agent' => 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4'})
end
View spam.groovy
listofemails = new File("email_list.txt").text
listofemails.eachLine { it ->
def respons = new XmlSlurper().parseText(new URL("http://www.stopforumspam.com/api?email=${it}").text)
if (respons.appears.text() == "yes") {
println "${it} has been reported ${respons.frequency.text()} times on stopforumspam.com"
}
}
View rabbitmq_config
input {
generator {
lines => [
"2017-02-12 14:50:98 DEBUG Main:12 - Test log file",
"2017-02-12 14:51:98 INFO Main:13 - Test log file",
"2017-02-12 14:52:98 WARN Main:14 - Test log file",
"2017-02-12 14:53:98 ERROR Main:15 - Test log file",
"2017-02-12 14:54:98 FATAL Main:16 - Test log file"
]
add_field => { "service" => "a" }
View bitbucket-pipelines.yml
image: amscotti/jekyll-build
pipelines:
default:
- step:
script:
- bundle exec jekyll build
branches:
master:
- step:
View Dockerfile
FROM alpine:3.2
MAINTAINER Anthony Scotti <anthony.m.scotti@gmail.com>
# Install base packages
RUN apk update
RUN apk upgrade
RUN apk add curl tar ca-certificates bash build-base libffi-dev
RUN curl -Ls https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.21-r2/glibc-2.21-r2.apk > /tmp/glibc-2.21-r2.apk
RUN apk add --allow-untrusted /tmp/glibc-2.21-r2.apk
View bitbucket-pipelines.yml
# This is a sample build configuration for Ruby.
# Check our guides at https://confluence.atlassian.com/x/VYk8Lw for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: ruby:2.1.7
pipelines:
default:
- step:
@amscotti
amscotti / client.rb
Created Aug 31, 2014
RPC using Redis
View client.rb
require 'redis'
require 'securerandom'
require 'msgpack'
class RedisRpcClient
def initialize(redis_url, list_name)
@client = Redis.connect(url: redis_url)
@list_name = list_name.to_s
end
View keybase.md

Keybase proof

I hereby claim:

  • I am amscotti on github.
  • I am amscotti (https://keybase.io/amscotti) on keybase.
  • I have a public key whose fingerprint is 3A0C E703 9982 AA6C 9048 6ED3 D2A9 0719 3B06 B986

To claim this, I am signing this object:

You can’t perform that action at this time.