def mirror(s):
"""
"""
stack = Stack()
x = 0
n = len(s)
# Check that the index x is valid index before using it. Short circuit evaluation.
while x < n and s[x] != 'm':
Random notes of important things to know when working with electronics. Or mainly a reference guide for me.
- standard size is 5mm
- many people recommend the 3/16" drill bit for drilling holes
- I used the 13/64" (5.1594mm) for a "large"? LED and it required some pushing.
- Useful conversion chart appears here: https://mdmetric.com/tech/cvtchtfdm.htm
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
| # Compress and decompress byte array | |
| function Get-CompressedByteArray { | |
| [CmdletBinding()] | |
| Param ( | |
| [Parameter(Mandatory,ValueFromPipeline,ValueFromPipelineByPropertyName)] | |
| [byte[]] $byteArray = $(Throw("-byteArray is required")) | |
| ) | |
| Process { |
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
| Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long | |
| Private Declare PtrSafe Function GetCurrentProcessId Lib "kernel32" () As Long | |
| Public Declare Function Keio2 Lib "kernel32" Alias "LoadLibraryW" (ByVal lpLibFileName As String) As Long | |
| Public Declare Function VEEAAM2 Lib "kernel32" Alias "LoadLibraryW" (ByVal lpLibFileName As String) As Long | |
| Public Declare Function wspPush2 Lib "kernel32" Alias "LoadLibraryW" (ByVal lpLibFileName As String) As Long | |
| Declare Function GetLogicalDrives& Lib "kernel32" () | |
| Declare Function GetShortPathName Lib "Kernel32.dll" Alias _ | |
| Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" ( _ | |
| Declare Function GlobalAlloc Lib "kernel32" (ByVal wFlags As Long, ByVal dwBytes As Long) As Long | |
| Declare Function GlobalLock Lib "kernel32" (ByVal hMem As Long) As Long |
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 System; | |
| import System.Runtime.InteropServices; | |
| import System.Reflection; | |
| import System.Reflection.Emit; | |
| import System.Runtime; | |
| import System.Text; | |
| //C:\Windows\Microsoft.NET\Framework\v2.0.50727\jsc.exe Shellcode.js | |
| //C:\Windows\Microsoft.NET\Framework\v4.0.30319\jsc.exe Shellcode.js | |
OlderNewer