Skip to content

Instantly share code, notes, and snippets.


Jennifer Konikowski jmkoni

View GitHub Profile
jmkoni / measure.rb
Created May 26, 2015
Benchmark script from Ruby Performance Optimization (
View measure.rb
require "json"
require "benchmark"
class Measure
no_gc = (ARGV[0] == "--no-gc")
if no_gc
# collect memory allocated during library loading # and our own code before the measurement
jmkoni / lpthwdjango
Created Aug 18, 2013
Starting project for final LPTHW class
View lpthwdjango
1) Change into directory that you want your project in.
ex: mkdir SongIdentifier
cd SongIdentifier
2) Install and run virtualenv
pip install virtualenv
virtualenv --no-site-packages testenv
source testenv/bin/activate
3) Install required packages:
View measurerails2.rb
require "json"
require "benchmark"
class Measure
no_gc = (ARGV[0] == "--no-gc")
if no_gc
View pyladiessqltestdata.sql
INSERT INTO person ('id', 'first_name', 'last_name', 'email') VALUES (1, 'Rylee', 'Wynn', '');
INSERT INTO pet ('id', 'name', 'owner_id', 'species', 'birth_date') VALUES (1, 'Amani', 1, 'rabbit', '2013-03-30 10:00:00');
INSERT INTO pet ('id', 'name', 'owner_id', 'species', 'birth_date') VALUES (2, 'Brayan', 1, 'snake', '2003-12-03 10:00:00');
INSERT INTO address ('id', 'person_id', 'street_address', 'city', 'state', 'zip_code') VALUES (1, 1, '5836 Leroy', 'Stamford', 'CT', '06999');
INSERT INTO person ('id', 'first_name', 'last_name', 'email') VALUES (2, 'Korbin', 'Stuart', '');
INSERT INTO pet ('id', 'name', 'owner_id', 'species', 'birth_date') VALUES (3, 'April', 2, 'cat', '2013-07-13 10:00:00');
INSERT INTO address ('id', 'person_id', 'street_address', 'city', 'state', 'zip_code') VALUES (2, 2, '5244 Summit', 'Hialeah', 'FL', '33007');
INSERT INTO person ('id', 'first_name', 'last_name', 'email') VALUES (3, 'Rebecca', 'Reilly', 'Rebecca.REILLY1364@monumentma

Hello $recruiter,

Thank you for reaching out to me about this position. While the job description sounds like something I would be a great fit for and would excel at, I realize that should I interview for this position, the skills evaluated will be my interviewing skills instead of my technical ones. For example, $company is currently found on, a curated list of tech companies known to use high-pressure interview tactics such as live-coding and whiteboarding. Not only that, setting aside the outcome, my previous interview experience at $company was not a positive one. While I admit I could have

jmkoni /
Created Jan 24, 2018 — forked from dergachev/
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF


To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

View Authentication.scala
import javax.servlet.http.{Cookie, HttpServletRequest}
import play.twirl.api.{Html, HtmlFormat}
import scala.util.{Failure, Success}
object Authentication {
def authenticateCookie(
request: HttpServletRequest): Option[UserTokenData] = {
val token =
View Jwt.scala
import org.json4s.DefaultFormats
import org.json4s.jackson.JsonMethods.parse
import pdi.jwt.{Jwt, JwtAlgorithm}
import scala.util.Try
* This object decodes JWTs that are created by another application.
* There are a few different options available for parsing JWTs and I went with:
View JwtTests.scala
import org.scalatest.{Matchers, WordSpec}
import pdi.jwt.{Jwt, JwtAlgorithm, JwtClaim}
class JwtTests extends WordSpec with Matchers {
val expirationNumber = 10
"A user data token" can {
"valid token" should {
View MyServlet.scala
import org.scalatra.ScalatraServlet
class MyServlet extends ScalatraServlet {
get("/") {
authenticateCookie(request) match {
case Some(_) => {
case None => {
You can’t perform that action at this time.