Skip to content

Instantly share code, notes, and snippets.

View amdelamar's full-sized avatar

Austin Delamar amdelamar

View GitHub Profile
@amdelamar
amdelamar / eject.vbs
Created June 7, 2016 13:23
Randomly Eject CD/DVD tray
do
MsgBox "There is no disc in the drive. Please insert a disc to continue.", 65, "CD/DVD Not Found"
For Each d in CreateObject("Scripting.FileSystemObject").Drives
WScript.sleep 60
If d.DriveType = 4 Then
CreateObject("Shell.Application").Namespace(17).ParseName(d.DriveLetter & ":\").InvokeVerb("Eject")
End If
Next
WScript.sleep int(300000*Rnd)
loop
@amdelamar
amdelamar / createShortcut.vbs
Last active October 18, 2016 14:35
Creates Shortcuts for Windows users
' This script creates a Desktop Shortcut
Option Explicit
Dim objShell, objDesktop, objLink
Set objShell = CreateObject("WScript.Shell")
objDesktop = objShell.SpecialFolders("Desktop")
Set myShortcut = objShell.CreateShortcut(objDesktop & "\Your Application.lnk")
myShortcut.HotKey = "CTRL+SHIFT+X"
myShortcut.TargetPath = """C:\Users\You\YourCompany\YourApplication\app.exe"""
Windows Registry Editor Version 5.00
; Author: Austin Delamar
; Created: Aug 5th 2015
; Sets .jar .war and .ear filetypes to be recognized as .zip on windows.
; This helps when debugging deployments, for easy dbl-click to open.
[HKEY_CLASSES_ROOT\SystemFileAssociations\.jar\CLSID]
@="{E88DCCE0-B7B3-11d1-A9F0-00AA0060FA31}"
@amdelamar
amdelamar / pm-gradient.css
Last active March 18, 2018 19:42
ProtonMail Gradient Background
body {
background-color: #e6e6f2 !important;
background-image: -webkit-linear-gradient(135deg, #e6e6f2 0%, #9497ce 100%) !important;
background-image: -moz-linear-gradient(135deg, #e6e6f2 0%, #9497ce 100%) !important;
background-image: -o-linear-gradient(135deg, #e6e6f2 0%, #9497ce 100%) !important;
background-image: linear-gradient(135deg, #e6e6f2 0%, #9497ce 100%) !important;
}
body #body, body header, body header a.logo, body section.sidebar, body #pm_main, #ptSidebar {
background: transparent !important;
}
@amdelamar
amdelamar / pm-image.css
Last active March 18, 2018 19:43
ProtonMail Background Image
html {
/* Just change this image to your own */
background: url(https://mail.protonmail.com/assets/img/login.jpg) no-repeat center center fixed #667cbd;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
body, body #body, body header, body header a.logo, body section.sidebar, body #pm_main, #ptSidebar {
background: transparent !important;
@amdelamar
amdelamar / pm-image-blur.css
Last active March 18, 2018 19:41
ProtonMail Background Image w/ Blur
html {
/* Just change this image to your own. And edit the one below too. */
background: url(https://mail.protonmail.com/assets/img/login.jpg) no-repeat center center fixed #667cbd;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
body #pm_main::before {
/* Edit this image to be the same. */
@amdelamar
amdelamar / colors.bat
Created August 31, 2017 14:03
Console Colors
@echo off
cls
echo  STYLES 
echo ^<ESC^>[0m Reset
echo ^<ESC^>[1m Bold
echo ^<ESC^>[4m Underline
echo ^<ESC^>[7m Inverse
echo.
echo  NORMAL FOREGROUND COLORS 
echo ^<ESC^>[30m Black (black)
@amdelamar
amdelamar / opensslSelfSignCert.sh
Created October 19, 2017 16:43
Generates a Self-Signed certificate and private key
#!/usr/bin/env sh
# Generates a Self-Signed Certificate and private key.
# Optionally, add a password as an argument.
# Argument 1 can be a Password
if [ "$1" == "" ]
then
# No Password
echo 'Creating Key and Cert without a Password...'
openssl genrsa -out privkey.pem 4096
@amdelamar
amdelamar / keyPairGenerator.sh
Last active December 13, 2017 16:43
Generates 2048bit RSA keypair
#!/usr/bin/env sh
# Generates 2048bit RSA keypair
openssl genpkey -algorithm RSA -out jwt_private_key.pem -pkeyopt rsa_keygen_bits:2048
openssl rsa -pubout -in jwt_private_key.pem -out jwt_public_key.pem
#!/usr/bin/env sh
keytool -keyalg RSA -keystore keystore.jks -genkey -alias selfsigned