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
@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`
[Unit]
Description=Setup Systemd script for Artifactory in Tomcat Servlet Engine
After=network.target
[Service]
Type=forking
GuessMainPID=yes
Restart=always
RestartSec=5
PIDFile=/var/opt/jfrog/run/artifactory.pid
#!/usr/bin/env lua
local function BitAND(a,b)--Bitwise and
local p,c=1,0
while a>0 and b>0 do
local ra,rb=a%2,b%2
if ra+rb>1 then c=c+p end
a,b,p=(a-ra)/2,(b-rb)/2,p*2
end
return c
end
# System authorization information
auth --enableshadow --passalgo=sha512
firewall --disabled
firstboot --disable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
#!/usr/bin/env python
import json
import requests
import sys
def main():
if len(sys.argv) < 3:
print("usage: deprecate_module.py <module_name> <replacement_module>")
else:
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
# *** This file is auto-generated. Changes made here will be over-written. ***
# *** Use "subscription-manager repo-override --help" if you wish to make changes. ***
#
# If this file is empty and this system is subscribed consider
# a "yum repolist" to refresh available repos
#
#!/bin/bash
# This script generates a command which can be used to reboot a server at a random time between 3:00 AM and 6:59 AM.
hour=`printf "%02d" $(shuf -i 3-6 -n 1)`
minute=`printf "%02d" $(shuf -i 00-59 -n 1)`
reboot_time="$hour:$minute"
echo "shutdown -r $reboot_time"
version: '2'
services:
elasticsearch:
build:
context: elasticsearch/
args:
ELK_VERSION: $ELK_VERSION
volumes:
#!/usr/bin/ruby
# Calculate the number of seats to apportion for each state in the union.
# This script is based on the algorithm described at https://www.census.gov/population/apportionment/about/computing.html
def largest_hash_key(hash)
hash.max_by{|k,v| v}[0]
end
def get_multiplier(n)
return 1/(n*(n-1)**0.5)