Skip to content

Instantly share code, notes, and snippets.

View blackknight36's full-sized avatar
💭
I may be slow to respond.

Michael blackknight36

💭
I may be slow to respond.
View GitHub Profile
#!/usr/bin/python2
from string import maketrans
ciphertext = "SEHRTAGPANITMARECYCHINGOHYRWRHLIOREENESAAAIEONIXRTWTHSMTAUOTPBHIEWKBENSRBARANRINICDBSYNETCYNOTTHUAMSARHHCWIUEIRAIDIEOHNORRLAKVMVSUEFUATDHIEAATSSOSLEISNGNLEETTRASNNSGISSR"
def main():
msg = []
for i in range(1, len(ciphertext)/13):
#!/usr/bin/python2.7
import xlrd
nms = []
snow = []
loc = ('server_list.xls')
wb = xlrd.open_workbook(loc)
#!/usr/bin/env ruby
def check_server(url)
@output = %x(httping -c 1 -s -l -m #{url}).split()
return @output[-1].to_i
end
status = check_server('https://www.watters.ws/405.html')
puts "server down" if status != 200
#!/usr/bin/env ruby
require 'uuidtools'
uuid = UUIDTools::UUID.sha1_create(UUIDTools::UUID_OID_NAMESPACE, "0e:00:00:86:17:03")
puts(uuid)
if $facts['operatingsystemmajrelease'] in String(range('7', '8')) {
notice ("This host is running CentOS $::operatingsystemrelease")
}
if $facts['operatingsystemrelease'] in String(range('20', '29')) {
notice ("This host is running Fedora $::operatingsystemrelease")
}
if $facts['operatingsystemrelease'] in ['20', '21', '22', '23', '24', '25'] {
notice ("This host is running Fedora $::operatingsystemrelease")
#!/usr/bin/env ruby
require 'digest'
def hex_to_int(s)
return s.to_i(16)
end
mac = "b0:26:28:4f:e7:ef".split(':').map { |h| hex_to_int(h) }
pipeline {
agent any
stages{
stage('Checkout') {
steps {
git branch: '${BRANCH}', url: 'git://mdct-pagure.dartcontainer.com/puppet.git'
}
}
stage('Unit Testing') {
#!/usr/bin/ruby
count = 0
File.foreach('six_letters.txt') do |line|
line.downcase!
letters = line.split(%r{\s*})
values = letters.map do |letter|
# This converts the ascii value of the character to match the English alphabet
# See http://www.asciitable.com for details
letter.ord - 96
@blackknight36
blackknight36 / twitch_irc.md
Created April 11, 2020 18:36 — forked from hunterbridges/twitch_irc.md
How to connect to Twitch with an IRC client (As of Oct 2015)

HOWTO

Connect to Twitch.tv chat with an IRC client

  1. Visit this website and get an OAuth Token for your Twitch account.
  2. Add a server to your IRC client with this configuration, using your OAuth Token as the server password. Make sure it is not using SSL.
{
  address = "irc.twitch.tv";
chatnet = "Twitch";
#!/bin/bash
if [ $# -lt 1 ];
then echo "Please provide a host name. For example: $0 spmasv-ignap01"
exit 1
fi
hostname=$1
domain='dartcontainer.com'
ip=`dig +short $hostname.$domain`