Skip to content

Instantly share code, notes, and snippets.

View Supm4n's full-sized avatar
💭
Hacker + Marketing

AZIKA-EROS Christ Supm4n

💭
Hacker + Marketing
View GitHub Profile
#In Python3.x this is the closest thing I could come up with to executing a file directly, that matches running python /path/to/somefile.py.
#Notes:
#Uses binary reading to avoid encoding issues
#Garenteed to close the file (Python3.x warns about this)
#defines __main__, some scripts depend on this to check if they are loading as a module or not for eg. if __name__ == "__main__"
#setting __file__ is nicer for exception messages and some scripts use __file__ to get the paths of other files relative to them.
def exec_full(filepath):
import os
@Supm4n
Supm4n / Outlook.vb
Last active August 29, 2015 14:10
Forgot attachment detector + cancel option after 3 seconds
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim mailItem As Outlook.mailItem
If Not Item.Class = olMail Then Exit Sub
Set mailItem = Item
Dim attachedWords(0 To 3) As String
attachedWords(0) = "attached"
attachedWords(1) = "pièce jointe"
@Supm4n
Supm4n / hmacsha1.cpp
Created July 10, 2013 19:25
HMAC-SHA1 w/ QT
QString hmacsha1(const QString & key, const QString & data){
QByteArray ipad;
QByteArray opad;
QByteArray ctx;
QByteArray sha1;
QByteArray k;
k = key.toAscii();

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage