Instantly share code, notes, and snippets.

# Alissa Pajer alissapajer

Created October 8, 2012 03:36
Rainier packing list!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 backpack pack cover hiking poles sleeping bag sleeping pad tent water bottles camelback water purification system
Created February 9, 2014 11:54 — forked from 23Skidoo/IntermHaskell.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 -- https://haskell.fpcomplete.com/user/DanBurton/20-intermediate-exercises -- Originally from http://blog.tmorris.net/posts/20-intermediate-haskell-exercises/ class Fluffy f where furry :: (a -> b) -> f a -> f b -- Exercise 1 -- Relative Difficulty: 1 instance Fluffy [] where furry = fmap
Last active August 29, 2015 13:58
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 import java.util.concurrent.ConcurrentHashMap object Why { val data = new ConcurrentHashMap[Int, String] def update(int: Int, str: String): Unit = { data.put(int, str) } }
Last active April 1, 2016 06:34
Contravariant and Covariant Functors and Variance of Types over their Type Parameters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 /** * Exercises explaining covariant and contravariant functors. * * Additionally exercises explaining variance of types over their type parameters. * * Implement the `???` functions. Are all implementable? */ trait Functors { /**
Created January 29, 2015 20:17

### Keybase proof

I hereby claim:

• I am alissapajer on github.
• I am alissapajer (https://keybase.io/alissapajer) on keybase.
• I have a public key whose fingerprint is D378 1B6B 4665 571C DD7C 0C64 B9A0 6E42 6439 2BD1

To claim this, I am signing this object:

Last active August 29, 2015 14:17 — forked from kconragan/keyrepeat.shell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 # Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key # that enables you to choose a character from a menu of options. If you are on Lion # try it by pressing and holding down 'e' in any app that uses the default NSTextField # for input. # # It's a nice feature and continues the blending of Mac OS X and iOS features. However, # it's a nightmare to deal with in Sublime Text if you're running Vintage (Vim) mode, # as it means you cannot press and hold h/j/k/l to move through your file. You have # to repeatedly press the keys to navigate.
Last active October 25, 2015 08:19
vim shortcuts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 MOVEMENT j k h l - up down left right (by character) b w - left right (by word) gg G - bof eof 0 \$ - bol eol ^ - bot shift-% - jump to matching Klammer ctrl-e - up one line ctrl-y - down one line
Created May 17, 2016 16:20 — forked from tamitutor/osx-mongodb-rlimits-fix.md
Fix Mongodb "soft rlimits" Warning On Mac OS X (Yosemite)

If you are seeing Mongo soft rlimits warnings in your logs, or a `WARNING: soft rlimits too low. Number of files is 256, should be at least 1000` when you login to mongo shell via `mongo` from the commandline, or any mysterious/unexplained mongo connection errors... follow this how-to exactly and it will resolve the issue for you.

(Source of this how to found at basho/basho_docs#1402)

First file: `sudo vi /Library/LaunchDaemons/limit.maxfiles.plist`

...containing:

Created April 1, 2019 17:43 — forked from chrisvest/Notes.md
PrintCompilation on different versions of HotSpot VM

## About `PrintCompilation`

This note tries to document the output of `PrintCompilation` flag in HotSpot VM. It was originally intended to be a reply to a blog post on PrintCompilation from Stephen Colebourne. It's kind of grown too big to fit as a reply, so I'm putting it here.

Written by: Kris Mok rednaxelafx@gmail.com

Most of the contents in this note are based on my reading of HotSpot source code from OpenJDK and experimenting with the VM flags; otheres come from HotSpot mailing lists and other reading materials listed in the "References" section.

This

Created April 1, 2019 17:43 — forked from djspiewak/quick-tips-optimizing-jvm.md

# Quick Tips for Fast Code on the JVM

I was talking to a coworker recently about general techniques that almost always form the core of any effort to write very fast, down-to-the-metal hot path code on the JVM, and they pointed out that there really isn't a particularly good place to go for this information. It occurred to me that, really, I had more or less picked up all of it by word of mouth and experience, and there just aren't any good reference sources on the topic. So… here's my word of mouth.

This is by no means a comprehensive gist. It's also important to understand that the techniques that I outline in here are not 100% absolute either. Performance on the JVM is an incredibly complicated subject, and while there are rules that almost always hold true, the "almost" remains very salient. Also, for many or even most applications, there will be other techniques that I'm not mentioning which will have a greater impact. JMH, Java Flight Recorder, and a good profiler are your very best friend! Mea