Skip to content

Instantly share code, notes, and snippets.

View VaughnGH's full-sized avatar
💭

Vaughn GH VaughnGH

💭
View GitHub Profile
@raphlinus
raphlinus / parse.cu
Created April 23, 2018 19:31
sketch of prefix sum to do backslash unescaping in cuda
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,

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

@bobpoekert
bobpoekert / pdf_urls.txt
Created October 24, 2017 07:25
262k PDFs
This file has been truncated, but you can view the full file.
https://www.pdf-archive.com/2011/01/01/great-big-hug-cowl-pattern-version-1/great-big-hug-cowl-pattern-version-1.pdf
https://www.pdf-archive.com/2011/01/01/brentsteinbergillustrations/brentsteinbergillustrations.pdf
https://www.pdf-archive.com/2011/01/01/summing-up-transfers-on-january-1st/summing-up-transfers-on-january-1st.pdf
https://www.pdf-archive.com/2011/01/03/10-retro/10-retro.pdf
https://www.pdf-archive.com/2011/01/03/10-vol/10-vol.pdf
https://www.pdf-archive.com/2011/01/03/progress-report-28-12-2010/progress-report-28-12-2010.pdf
https://www.pdf-archive.com/2011/01/03/guide/guide.pdf
https://www.pdf-archive.com/2011/01/03/dating-relationships-and-all-that-awkward-stuff/dating-relationships-and-all-that-awkward-stuff.pdf
https://www.pdf-archive.com/2011/01/04/q1-and-q2/q1-and-q2.pdf
<!DOCTYPE html>
<html>
<head><title>Fizzlefade</title></head>
<body>
<canvas id="framebuffer" width="320" height="200"></canvas>
<script type="text/javascript">
/* Fizzlefade using a Feistel network.
#!/bin/bash
# Validate the input
if [ "$#" -ne 1 ]; then
printf "Enter a branch number only\n"
exit
fi
# Special case if the argument is "-"
if [ $1 = "-" ];
first, create a bash script, put this in it.
#!/bin/bash
while IFS='' read -r line || [[ -n "$line" ]]; do
curl --user-agent "$line" <the url you want to troll>
done < "$1"
Name it something dumb. logshove.sh
Next create a file with no url-encodable chars. Make sure every line is the same length. don't use spaces. I used periods.
@dannguyen
dannguyen / go-python-go.sh
Last active July 9, 2022 03:40
Batch installation script for installing fun Python libraries for compciv2017 class (on top of Anaconda/Python 3.5+)
###############################################################################
# Batch script for setting up fun Python libraries for Computational Methods in the Civic Sphere 2017
#
# Should be run after installing Anaconda 4.2+/Python 3.5+ via https://www.continuum.io/downloads
#
# Doesn't include libraries that are installed as dependencies (e.g. numpy via pandas)
##############################################################################
##############################################################################
###### Yes
@sshadmand
sshadmand / Adding tmux
Last active May 4, 2022 19:44 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
Create a tmux conf file
#> touch ~/.tmux.conf
Install TMP
#> git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
[Copy and paste tmux.conf below into local file.]
Load tmux configurations
#> tmux source-file ~/.tmux.conf
@aliellis
aliellis / gist:3714d9c9510fa547e41156c1e1d639de
Last active March 31, 2022 11:30
Hooking up Ganglia to Grafana (all services on a single EMR cluster, different boxes TBC)
Edit the gmetad.conf file of Ganglia to include the following values:
carbon_server: "localhost"
carbon_port: 3000
carbon_protocol udp
carbon_timeout 500
Edit the influxdb.conf file of InfuxDB to include the following values:
@steipete
steipete / ios-xcode-device-support.sh
Last active September 16, 2024 18:26
Using iOS 15 devices with Xcode 12.5 (instead of Xcode 13)
# The trick is to link the DeviceSupport folder from the beta to the stable version.
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :)
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5:
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions
# (A similar approach works for older versions too, just change the version number after DeviceSupport)