Skip to content

Instantly share code, notes, and snippets.

View matthiasballreich's full-sized avatar

Matthias Ballreich matthiasballreich

View GitHub Profile
@matthiasballreich
matthiasballreich / BalsamiqForever.py
Created January 27, 2023 09:47 — forked from HoussemNasri/BalsamiqForever.py
Extend your trial period for Balsamiq Wireframes on Windows and macOS Forever!
import json
import os
import time
import webbrowser
import sys
import re
def handleWindows(extra_seconds):
print("OS : Windows")
@matthiasballreich
matthiasballreich / CertificateNSS.cpp
Created March 7, 2019 10:35 — forked from pehrlich/CertificateNSS.cpp
Cross Platform Mozilla NSS Root Certificate Installation
#include "stdafx.h"
#include "CertificateNSS.h"
#include "Certificate.h"
#include <boost/filesystem/operations.hpp>
#include <nss.h>
#include <cert.h>
#include <certdb.h>
ProfileLocker::ProfileLocker(const boost::filesystem::path& profilePath) : m_isValid(false)
@matthiasballreich
matthiasballreich / create-x509.cpp
Last active December 12, 2018 11:35 — forked from nathan-osman/CMakeLists.txt
Generates a self-signed x509 certificate using OpenSSL.
#include <cstdio>
#include <iostream>
#include <openssl/pem.h>
#include <openssl/x509.h>
/* Generates a 2048-bit RSA key. */
EVP_PKEY * generate_key()
{
/* Allocate memory for the EVP_PKEY structure. */
@matthiasballreich
matthiasballreich / ConvertVisioToPNG.vbs
Created February 1, 2017 14:22
Convert Visio File to PNG (including all Pages)
'---------------------------------------------------------------------------------
' The sample scripts are not supported under any Microsoft standard support
' program or service. The sample scripts are provided AS IS without warranty
' of any kind. Microsoft further disclaims all implied warranties including,
' without limitation, any implied warranties of merchantability or of fitness for
' a particular purpose. The entire risk arising out of the use or performance of
' the sample scripts and documentation remains with you. In no event shall
' Microsoft, its authors, or anyone else involved in the creation, production, or
' delivery of the scripts be liable for any damages whatsoever (including,
' without limitation, damages for loss of business profits, business interruption,
@matthiasballreich
matthiasballreich / gist:96a9ef2fb5739cb11d5f2da2cfd807fc
Created June 16, 2016 13:32 — forked from idiom/gist:5716494
Building Mozilla NSS (Network Security Services) on Windows
1. Download & Install Visual Studio 2010 - Version able to compile C++
2. Download and Install Mozilla build files http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe
3. Download the latest NSS package from: http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/
Download the tar with npsr
4. Create a directory C:\src
5. Extract nss to c:\src
So this will end up looking like c:\src\nss-3.15
6. Run the Mozilla build shell: C:\mozilla-build\start-msvc10.bat
7. Create the required env variables
Type: export OS_TARGET="WINNT"
@matthiasballreich
matthiasballreich / wp-reposive-video
Created December 19, 2015 00:44 — forked from ihorvorotnov/wp-reposive-video
WordPress Resposive Videos (oEmbed + iframe/embed)
1. Add this to your functions.php or inc/templates-tags.php
/**
* Wrap videos embedded via oEmbed to make them responsive
*/
function p2_wrap_oembed( $html, $url, $attr, $post_id ) {
return '<div class="video-embed">' . $html . '</div>';
}
add_filter( 'embed_oembed_html', 'p2_wrap_oembed', 99, 4 );
@matthiasballreich
matthiasballreich / ChangePassword.java
Created November 14, 2015 18:44 — forked from zach-klippenstein/ChangePassword.java
The keystore password on Java keystore files is utterly pointless. You can reset it without knowing it, as shown by this code. Note that private keys are still secure, as far as I know. The JKS implementation is copyright Casey Marshall (rsdio@metastatic.org), and the original source is available at http://metastatic.org/source/JKS.java. I've in…
import java.util.*;
import java.io.*;
import java.security.*;
public class ChangePassword
{
private final static JKS j = new JKS();
public static void main(String[] args) throws Exception
{
/**
* Add new twitter field to EDD register form
*/
function sumobi_edd_add_registration_field() {
?>
<p>
<label for="edd-user-twitter-username"><?php _e( 'Twitter Username', 'edd' ); ?></label>
<input id="edd-user-twitter-username" class="edd-input" type="text" name="edd_user_twitter_username" />
</p>