Skip to content

Instantly share code, notes, and snippets.

View mglinski's full-sized avatar

Matthew Glinski mglinski

View GitHub Profile
@mglinski
mglinski / ECDSA.php
Last active January 3, 2016 13:19
ECDSA API Encapsulation for https://github.com/mdanter/phpeccRequires GMP Libraries in PHP
<?php
/**
* Class ECDSA
*
* Encapsulate ECDSA Functions from phpecc (https://github.com/mdanter/phpecc) into an easy to use API
*
* @author Matthew Glinski
* @link
* @version 1.0
* @license MIT (http://opensource.org/licenses/MIT)
@mglinski
mglinski / keybase.md
Created June 9, 2015 21:47
keybase.md

Keybase proof

I hereby claim:

  • I am mglinski on github.
  • I am mglinski (https://keybase.io/mglinski) on keybase.
  • I have a public key whose fingerprint is E615 2AC6 1093 AB36 E379 BE34 37EF FE36 613A F196

To claim this, I am signing this object:

Setup

AWS c4.xlarge instance with 32gb EBS, io1 store type with 960 IOPS

Latest 64bit AMI Linux

Default php56 installed with YUM, including opcache,fpm,mbstring

Default nginx installed with YUM, with some configurations

@mglinski
mglinski / snowden-ietf93.md
Last active August 29, 2015 14:27 — forked from mnot/snowden-ietf93.md
Transcript of Edward Snowden's comments at IETF93.
@mglinski
mglinski / IntelliJ_IDEA__Perf_Tuning.txt
Created December 8, 2015 22:09 — forked from P7h/IntelliJ_IDEA__Perf_Tuning.txt
Performance tuning parameters for IntelliJ IDEA. Add these params in idea64.exe.vmoptions or idea.exe.vmoptions file in IntelliJ IDEA. If you are using JDK 8.x, please knock off PermSize and MaxPermSize parameters from the tuning configuration.
-server
-Xms2048m
-Xmx2048m
-XX:NewSize=512m
-XX:MaxNewSize=512m
-XX:PermSize=512m
-XX:MaxPermSize=512m
-XX:+UseParNewGC
-XX:ParallelGCThreads=4
-XX:MaxTenuringThreshold=1
-server
-Xms2048m
-Xmx2048m
-XX:NewSize=512m
-XX:MaxNewSize=512m
-XX:PermSize=512m
-XX:MaxPermSize=512m
-XX:+UseParNewGC
-XX:ParallelGCThreads=4
-XX:MaxTenuringThreshold=1
# see https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/
# core
brew install coreutils
# key commands
brew install binutils
brew install diffutils
brew install ed --default-names
brew install findutils --with-default-names
<?php
function returnsInt() : int {
return 2;
}
function returnsFloat() : float {
return 1;
}
@mglinski
mglinski / readme.md
Last active January 11, 2024 18:08
Ensure current page UTMs are set on all page links using javascript

I took some examples from khanhicetea and dillansimmons from this older gist and made a hybrid version using URL and URLSearchParams classes for all of the heavy lifting. This method will not work on older browsers.

This js snippet propagate any query param starting with utm_ in the current page url into all <a href="..." /> tags on the current page, taking care to follow the following constraints:

  • No other query params will be injected except ones starting with utm_
  • Only links with the same exact domain name will have utm params injected
  • If a link has existing UTM params already, this will skip those links and not clobber existing UTM params
  • Existing query params in each link will be preserved

Hopefully this saves someone time in the future.