Updated: Just use qutebrowser (and disable javascript). The web is done for.
$(window).on("scroll", function() { | |
var scrollHeight = $(document).height(); | |
var scrollPosition = $(window).height() + $(window).scrollTop(); | |
if ((scrollHeight - scrollPosition) / scrollHeight === 0) { | |
// when scroll to bottom of the page | |
} | |
}); |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
neuter: { | |
app: { | |
options: { | |
filepathTransform: function (filepath) { | |
return './src/assets' + '/' + filepath; | |
} |
#!/bin/bash -e | |
echo ' | |
PATH=$HOME/go/bin:$PATH | |
export GOPATH=$HOME | |
export CDPATH=.:$HOME/src/golang.org/x:$HOME/go/src:$HOME/src/github.com:$HOME/src/github.com/nf:$HOME/src/github.com/adg | |
export EDITOR=vim | |
' >> ~/.profile | |
sudo apt-get update |
# copied from http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/ | |
git clone <git repository A url> # clone source repository | |
cd <git repository A directory> | |
git remote rm origin # to make sure it doesn't affect the original repository | |
git filter-branch --subdirectory-filter <directory 1> -- --all # remove all files other than the ones needed | |
mkdir <directory 1> # move them into another directory where they will be stored in the destination repository (if needed) | |
mv * <directory 1> | |
git add . | |
git commit |
#!/bin/bash | |
# | |
# steps taken verbatim from: | |
# http://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html#install_docker | |
# | |
sudo yum update -y | |
sudo yum install -y docker | |
sudo service docker start | |
sudo usermod -a -G docker ec2-user | |
# log out and log in to pickup the added group |
#!/bin/bash | |
# Install prerequisites | |
yum install -y gcc openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel ruby-devel gcc-c++ jq git | |
# Import key | |
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - | |
# Install RVM | |
curl -sSL https://get.rvm.io | bash -s stable --ruby |
import mailbox | |
import csv | |
writer = csv.writer(open("mbox-output.csv", "wb")) | |
for message in mailbox.mbox('file.mbox/mbox'): | |
writer.writerow([message['message-id'], message['subject'], message['from']]) |
ColorBackground=#28282a2a3636 | |
ColorForeground=#f8f8f8f8f2f2 | |
ColorSelection=#363639394848 | |
ColorBold=#f4f47676c3c3 | |
ColorCursor=#5050fafa7b7b | |
TabActivityColor=#5050fafa7b7b | |
ColorPalette=#000000000000;#9a9a40404646;#90907979b3b3;#929298986363;#3d3d98985a5a;#9a9a53538282;#3a3a4d4d5b5b;#8bfc8bfc8ccc;#4d4d4d4d4d4d;#ffff55555555;#cacaa9a9fafa;#f1f1fafa8c8c;#5050fafa7b7b;#ffff7979c6c6;#8b8be9e9fdfd;#f8f8f8f8f2f2 | |
ColorSelectionUseDefault=FALSE | |
ColorBoldUseDefault=FALSE |
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