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
(Get-Host).UI.RawUI.WindowTitle = "Windows PowerShell" | |
function Get-DirAlias ([string]$loc) { | |
return $loc.Replace($env:homedrive + $env:homepath, "~") | |
} | |
function prompt { | |
Write-Host "$env:username@$env:computername" -NoNewLine -ForegroundColor Green | |
Write-Host ":" -NoNewLine | |
Write-Host "$(Get-DirAlias($(Get-Location)))" -NoNewLine -ForegroundColor Cyan |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\Directory\Background\shell\powershell] | |
@="Open PowerShell here" | |
[HKEY_CLASSES_ROOT\Directory\Background\shell\powershell\command] | |
@="C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe -nologo -noexit" | |
[HKEY_CLASSES_ROOT\Directory\shell\powershell] | |
@="Open PowerShell here" |
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
if SERVER then | |
AddCSLuaFile("shared.lua") | |
require("cvar2") | |
cvar2.SetFlags("sv_cheats", FCVAR_REPLICATED) | |
end | |
if CLIENT then | |
SWEP.PrintName = "Totally Ordinary Deagle" | |
SWEP.Author = "schlarpc" | |
SWEP.Slot = 6 |
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 | |
set -euo pipefail | |
GADGET_NAME=usbarmory | |
LANGUAGE=0x409 # English | |
MANUFACTURER="Inverse Path" | |
PRODUCT="USB Armory" | |
HOST_ADDRESS="1a:55:89:a2:69:42" |
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
import datetime | |
class GetTime(type): | |
def __getitem__(cls, item): | |
if isinstance(item, slice): | |
hours = item.stop if item.start is None else item.start | |
minutes = item.stop if item.start is not None else 0 | |
seconds = item.step or 0 | |
elif isinstance(item, int): | |
hours = item |
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
import ctypes | |
class PyObject(ctypes.Structure): | |
pass | |
PyObject._fields_ = [ | |
('ob_refcnt', hasattr(ctypes.pythonapi, 'Py_InitModule4_64') and ctypes.c_int64 or ctypes.c_int), | |
('ob_type', ctypes.POINTER(PyObject)), | |
] |
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
import contextlib | |
import ctypes | |
import inspect | |
import mock | |
import collections | |
import re | |
import attr | |
import six | |
class MatchError(Exception): |
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
import collections | |
import datetime | |
import decimal | |
import importlib | |
import io | |
import amazon.ion.core | |
import amazon.ion.simple_types | |
import amazon.ion.simpleion | |
import attr |
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
import requests | |
import requests.models | |
import lxml.html | |
import cached_property | |
class LxmlResponse(requests.models.Response): | |
@classmethod | |
def use_in_session(cls, session=None): | |
if not session: | |
session = requests.Session() |
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
# A Python 3 meta path finder for importing GitHub gists by id. | |
# This is a terrible idea. | |
# Usage: | |
# from gist.schlarpc import _6e0119ab5804ace6a90204137541da8e as lxmlresponse | |
# underscores are stripped from the gist id, but if you don't want to use that or | |
# if the username doesn't meet the syntax requirements then i guess you can use __import__: | |
# lxmlresponse = __import__('gist.schlarpc.6e0119ab5804ace6a90204137541da8e') | |
import importlib.abc |
OlderNewer