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
$23andme = Get-Content ./genome_Gerard_Russell_v5_Full_20230325103743.txt | ConvertFrom-Csv -Delimiter "`t" -Header @("Rsid", "Chromosome", "Position", "Genotype") | |
$functional = Get-Content ./Raw_Gene_File.txt | ConvertFrom-Csv -Delimiter "`t" -Header @("Rsid", "Chromosome", "Position", "Genotype") | |
$compare = Compare-Object -ReferenceObject $23andme -DifferenceObject $functional -Property Rsid -IncludeEqual | |
$compare | ? {$_.SideIndicator -eq "=="} | Measure-Object | |
# Count : 38405 | |
# ... | |
$compare | ? {$_.SideIndicator -eq "=>"} | Measure-Object | |
# Count : 113493 |
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
$xmlLocation = "C:\path\to\*.xml" | |
$files = Get-ChildItem -Path $xmlLocation -Filter *.xml | |
$allHosts = @() | |
foreach($f in $files){ | |
$xmlContent = [Xml](Get-Content $f) | |
$xmlHosts = $xmlContent.nmaprun.host | |
$allHosts += $xmlHosts |
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
-- find the "best" shell sorted by user preference | |
-- expects a table input like | |
-- get_shell_by_pref({"pwsh", "powershell"}) | |
-- TODO: ordered? | |
function get_shell_by_pref(shell_tbl) | |
shell_prefs = { | |
'pwsh', | |
'powershell', | |
'cmd' -- don't know why you wouldn't have powershell on a windows host but :shrug: | |
} |
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
colorscheme:mc | |
cs_re:white,red,bold:\[[A-Za-z0-9_]{3,16}: Given.*] | |
cs_re:red:\[[\#A-Za-z0-9 \-]*\/ERROR\] | |
cs_re:cyan:\[[\#A-Za-z0-9 \-]*\/INFO\] | |
cs_re:yellow:\[[\#A-Za-z0-9 \-]*\/WARN\] | |
cs_re:magenta:\[[0-9:]{8}\] | |
cs_re:green:Player [A-Za-z0-9_]{3,16} is (now|not) AFK.* | |
cs_re:green:[A-Za-z0-9_]{3,16} lost connection:.* | |
cs_re:green:[A-Za-z0-9_]{3,16} left the game.* | |
cs_re:green:[A-Za-z0-9_]{3,16} joined the game.* |
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
# Cancer Headers -jrod | |
$bruh = array( | |
'Crack money', | |
'Duct tape and prayer', | |
'Chewing gum and optimistic thoughts', | |
'Micromely', | |
'Macromely', | |
'dreams(tm)', | |
'GFuel(tm)', | |
'The tears of GMod players', |
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
# hacky af script to pull gmod server info from master servers | |
# NOTE: Currently the most time consuming part of this script is PTR collection, need to find more efficient way | |
# TODO: The parrallel execution could introduce some issues w/ duplicates (edge case) | |
# TODO: Redo GeoIP handling to not use API so we can do 5 min interval runs of this | |
# FIX: Timestamp | |
# TODO: Clean this abhorrent shit up | |
from gevent.pool import Pool | |
from gevent import monkey # override/"patch" existing functions | |
from gevent import joinall |
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
# requires python-valve, and unicodecsv (only because python27 sucks at unicode CSVs) | |
import sys | |
import valve.source | |
import valve.source.a2s | |
import valve.source.master_server | |
import unicodecsv as csv | |
from pprint import pprint | |
import json | |
import urllib | |
import re |
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
dead=0 | |
while [ $dead -ne 2 ]; do | |
sleep 1 | |
ping -c 1 -t 1 MIGUEL_ADDR_HERE > /dev/null | |
if [ $? -eq 2 ]; then | |
echo "shit boi he ded" | |
say "shit boi he ded" | |
dead=2 | |
read -p "Press F to pay respects: " respects | |
if [[ $respects =~ ^[Ff]$ ]]; then |
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
kWh = input("Enter price per kWh in dollars: ") | |
idle = input("Enter idle/expected average power consumption of device in watts: ") | |
hrsPerDay = input("How many hours per day do you expect this device to be on: ") | |
# Some sanity checking here in a wee bit, only 24 hrs in day etc | |
monthlyCost = (((idle * hrsPerDay) / 1000) * 30) * kWh | |
print "\n" | |
print "Assuming average month of 30 days this device will cost $" + str(monthlyCost) + " per month." |
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 | |
# Chooch to import students into OD via a generated CSV | |
# The hackiest shell script you ever dun seen't this side of the Mississippi | |
# Some DSCL stuff stolen from here: https://gist.github.com/yesdevnull/7908795 | |
# ./studentChooch [csvFile.csv] | |
# TODO: Work on crypt password issue w/ Filemaker Pro | |
# Config Junk (Make sure all of this is correct |
NewerOlder