Skip to content

Instantly share code, notes, and snippets.

import datetime
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.asymmetric import padding
from botocore.signers import CloudFrontSigner
KEY_ID = '*****************'
FILE_URL = 'http://**********.cloudfront.net/s3.png'
@mickdekkers
mickdekkers / skypestatus.ahk
Created May 27, 2016 16:39
Change your Skype status programmatically
#NoEnv
#NoTrayIcon
#SingleInstance ignore
; The path to Skype's executable
skypePath := "C:\Program Files (x86)\Skype\Phone\Skype.exe"
; Used to identify Skype's main window
skypeWin := "ahk_exe Skype.exe ahk_class tSkMainForm"
; The X coordinate of all the status buttons
statusXCoord := 56
@shaunlebron
shaunlebron / _README.md
Last active October 13, 2024 09:24
Direct3D9 Wrapper DLL

In response to a StackOverflow question:

This is code to build a Direct3D wrapper DLL, intercepting all calls to Direct3D interface functions so that you can draw your own objects to display over the game. Just plop the DLL into the same folder as the game's executable, and it should load it as if it were the real d3d9.dll file. It still forwards all calls to the real one in system32, just allows stuff to happen in between. original stackoverflow answer

@mhberger
mhberger / setSkypeStatus.sh
Last active November 9, 2017 12:52
Set skype status using command line.
#!/usr/bin/env bash
STATUS=$1
if [ -z "$STATUS" ] ; then echo "usage $0 [ONLINE|AWAY]" ; exit; fi
(cat <<EOF
tell application "Skype"
send command "SET USERSTATUS ${STATUS}" script name "Set Skype Status"
end tell
/* GitHub stylesheet for MarkdownPad (http://markdownpad.com) */
/* Author: Nicolas Hery - http://nicolashery.com */
/* Version: b13fe65ca28d2e568c6ed5d7f06581183df8f2ff */
/* Source: https://github.com/nicolahery/markdownpad-github */
/* RESET
=============================================================================*/
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
@chales
chales / db-connect-test.php
Last active March 29, 2025 09:10
Script for a quick PHP MySQL DB connection test.
<?php
# Fill our vars and run on cli
# $ php -f db-connect-test.php
$dbname = 'name';
$dbuser = 'user';
$dbpass = 'pass';
$dbhost = 'host';
$connect = mysql_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'");
@scribu
scribu / README.md
Last active August 5, 2019 09:59
Convert notes from Tomboy XML to Evernote XML

This is a quick script to convert notes from Tomboy to Evernote.

Usage

pip install -r requirements.txt
mkdir export/
python tomboy-export.py <tomboy-dir>
// Copyright (c) 2013 Daniel Grunwald
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JsonTest
{
@jednano
jednano / gitcom.md
Last active February 27, 2025 03:05
Common git commands in a day-to-day workflow

Git Cheat Sheet

Initial Setup

Create an empty git repo or reinitialize an existing one

git init