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 'fuzzystringmatch' | |
class Phrase | |
attr_reader :matches | |
def initialize(str, match_score=0.8) | |
@str = str | |
@matches = [] | |
@match_score = match_score | |
@scorer = FuzzyStringMatch::JaroWinkler.create |
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 FuzzyMatch | |
class Matcher | |
require 'singleton' | |
require 'fuzzystringmatch' | |
include Singleton | |
JW = FuzzyStringMatch::JaroWinkler.create | |
def self.get_score(str1,str2) | |
JW.getDistance(str1,str2) | |
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
# Execution-Policy Not-Annoying | |
Update-ExecutionPolicy Unrestricted | |
# Remote admin is a good thing | |
Enable-RemoteDesktop | |
# Permanently install Chocolatey for updates and more packages later on | |
cinst -y chocolatey | |
# Why waste vertical screen space? |
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/local/env ruby | |
require "uri" | |
##################### | |
## ____ _ _ | |
## / ___|___ _ __ ___| |_ __ _ _ __ | |_ ___ | |
## | | / _ \| '_ \/ __| __/ _` | '_ \| __/ __| | |
## | |__| (_) | | | \__ \ || (_| | | | | |_\__ \ | |
## \____\___/|_| |_|___/\__\__,_|_| |_|\__|___/ |
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/local ruby | |
lists = { | |
blocklist_de: "https://lists.blocklist.de/lists/all.txt", | |
tor_exit: "https://www.dan.me.uk/torlist/?exit", | |
dshield: "http://feeds.dshield.org/block.txt", | |
spamhaus: "https://www.spamhaus.org/drop/drop.txt" | |
} | |
lists.each do |name,url| |
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
/** API SETUP - remove this section to run in New Relic Synthetics **/ | |
if ($http == null) { var $http = require('request'); } | |
/** API SETUP - remove this section to run in New Relic Synthetics **/ | |
// Global variables we'll need | |
var config = { | |
'SCRIPTNAME': 'apm-server-to-insights', | |
'VERSION': '1.0.2', | |
'EVENT_NAME': 'ServerData', | |
'ACCOUNT_ID': 'xxx', |
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 | |
puts "NR Bulk Query Explainer" | |
puts "make sure to adjust the mysql command line in the script to your local setup" | |
puts "Paste your SQL Statements Trace from New Relic and ~ and RETURN to submit." | |
cli = "mysql -uroot notes_from_scratch -e " | |
strings,queries = [],[] | |
while (s=gets)!="~\n" | |
strings << s | |
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
#!/bin/bash | |
# HR Proxy Scraper Script | |
# Rebuilded By Kyxrec0n | |
# Demo video : youtube.com/watch?v=iXCeR_XsP6o | |
# USAGE: ./proxy-scraper.sh <ARGUMENT> <OPTIONS> | |
# ARGUMENTS: | |
# Proxy Checker - Single Proxy Check | |
# -s <IP>:<PORT> | |
# | |
# Proxy Checker - List Scan: |
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
# -*- coding: utf-8 -*- | |
import scrapy | |
class SpiegelItem(scrapy.Item): | |
source = scrapy.Field() | |
date = scrapy.Field() | |
nchar = scrapy.Field() | |
text = scrapy.Field() |
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/perl | |
use strict; | |
use warnings; | |
use Web::Scraper; | |
use URI; | |
use Encode; | |
# use Spreadsheet::WriteExcel; | |
use strict; | |
use warnings; | |
use utf8; |