Skip to content

Instantly share code, notes, and snippets.

View tresf's full-sized avatar

Tres Finocchiaro tresf

View GitHub Profile
####################################################################
# #
# EXPERIMENTAL STEPS FOR FORCING HOMEBREW TO USE A 3RD-PARTY JDK #
# #
# USE AT YOUR OWN RISK #
# #
#################################################################$##
# We'll grab a stop-gap openjdk and save it to ~/Applications/openjdk
mkdir -p ~/Applications/openjdk
  1. Install Java
  2. Install and configure ANT to use Java
  3. Install Cygwin
  4. Install Cygwin components: make, automake, libtool, mingw-64-g++
  5. Configure your git environment to use unix line-endings
    git config --global core.autocrlf false
    git config --global core.eol lf
cl -nologo -EP -I"C:/Users/owner/Desktop/jna_bump-ffi/build/native-win32-x86-64/libffi" -I"C:/Users/owner/Desktop/jna_bump-ffi/native/libffi" -I"C:/Users/owner/Desktop/jna_bump-ffi/build/native-win32-x86-64/libffi" -I"C:/Users/owner/Desktop/jna_bump-ffi/native/libffi/include" -I"C:/Users/owner/Desktop/jna_bump-ffi/build/native-win32-x86-64/libffi/include" -I"C:/Users/owner/Desktop/jna_bump-ffi/native/libffi/src" -I"C:/Users/owner/Desktop/jna_bump-ffi/build/native-win32-x86-64/libffi" -I"C:/Users/owner/Desktop/jna_bump-ffi/native/libffi/include" -I"C:/Users/owner/Desktop/jna_bump-ffi/build/native-win32-x86-64/libffi/include" -I"C:/Users/owner/Desktop/jna_bump-ffi/native/libffi/src" -DHAVE_CONFIG_H -DPSAPI_VERSION='1' -DFFI_BUILDING -DUNICODE -D_UNICODE -DHAVE_PROTECTION C:/Users/owner/Desktop/jna_bump-ffi/native/libffi/src/x86/win64_intel.S > src/x86/win64_intel.asm
C:/Users/owner/Desktop/jna_bump-ffi/native/libffi/src/x86/win64_intel.S(2): fatal error C1083: Cannot open include file: 'fficonfig.h': No suc
@tresf
tresf / msvcc.sh
Last active November 2, 2020 21:15
MSVCC with better space handling
#!/bin/sh
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
@tresf
tresf / Default.aspx
Last active October 30, 2020 00:33
C# PageMethods for IE
<!-- Code intended to compliment link below, but for IE10/IE11 -->
<!-- https://gist.github.com/tresf/992d1411933b90981b77e7c9e38db7d8 -->
<!-- Start IE10/IE11 Pollyfills -->
<script src="https://cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/whatwg-fetch@3.4.1/dist/fetch.umd.js"></script>
<!-- End IE11 Pollyfills -->
<script type="text/javascript" src="@Url.Content("~/Scripts/qz-tray.js")"></script>
@tresf
tresf / HomeController.cs
Last active June 30, 2025 18:21
C# MVC Signing
using System;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Web.Mvc;
private static X509KeyStorageFlags STORAGE_FLAGS = X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.PersistKeySet | X509KeyStorageFlags.Exportable;
public ActionResult SignMessage()
{
@tresf
tresf / EdgeFiles.txt
Created October 22, 2020 17:38
Files that get cached to your home directory when you open Microsoft Edge on Ubuntu 18.04
/home/parallels/.cache/microsoft-edge
/home/parallels/.cache/microsoft-edge-dev
/home/parallels/.cache/gnome-software/icons/c1d16eac6309f3116efe2527010f3c51fa0b54b0-hedgewars.png
/home/parallels/.cache/microsoft-edge/Default
/home/parallels/.cache/microsoft-edge/Default/Cache
/home/parallels/.cache/microsoft-edge/Default/Code Cache
/home/parallels/.cache/microsoft-edge/Default/Storage
/home/parallels/.cache/microsoft-edge/Default/Cache/0141c5484afb0924_0
/home/parallels/.cache/microsoft-edge/Default/Cache/01c7593a93c02237_0
/home/parallels/.cache/microsoft-edge/Default/Cache/022aa26069ccfd40_0
@tresf
tresf / frames.html
Last active October 20, 2020 20:50
Sample async frame loading
<html>
<iframe id="frame1" src="https://qz.io"></iframe>
<iframe id="frame2" src="https://qz.io/about"></iframe>
<iframe id="frame3" src="https://qz.io/"></iframe>
<iframe id="frame4" src="https://qz.io/wiki/faq"></iframe>
<script>
/**
* @param {Array<string>}
*/
// Experiment of printing to Acrobat Command Line using Java
// Don't use:
// 1. Leaves Acrobat open and frontmost window
// 2. No control over landscape/portrait/auto
package com.company;
import com.sun.jna.platform.win32.Advapi32Util;
import com.sun.jna.platform.win32.WinReg;
@tresf
tresf / Main.pas
Last active August 28, 2020 19:21
Mecaf programming examples (Copyright dieboldnixdorf.com.br)
{
Diebold - Procomp
Divis�o de Mec�nica Fina
Programa vers�o 1.0
Elaborado por:
Rafael gottardi - AT/Suporte