start new:
tmux
start new with session name:
tmux new -s myname
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
class ContactFinder { | |
#db; | |
#chatToFind; | |
#dbName = "model-storage"; | |
#chatsCol = "chat"; | |
#contactCol = "contact"; | |
#groupCol = "participant"; | |
constructor(chatGroupName) { | |
this.#chatToFind = chatGroupName; |
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
package mani; | |
import static org.hamcrest.Matchers.equalTo; | |
import static org.hamcrest.Matchers.is; | |
import static org.junit.Assert.assertThat; | |
import static org.mockito.Mockito.verify; | |
import static org.mockito.Mockito.verifyNoMoreInteractions; | |
import static org.mockito.Mockito.when; | |
import static org.mockito.MockitoAnnotations.initMocks; |
#!/usr/bin/env perl | |
# Copyright (c) 2015 Sergey Lyubka | |
# All rights reserved | |
use Encode; | |
my $dir = "/Users/$ENV{USER}/.Trash"; | |
sub read_file($) { local $/; open FD, $_[0] or die $_[0]; binmode FD; <FD>; } |
This Gist describes how to tune HTTP browser cache expiration for static contents served by Wildfly Undertow web server, as per RFC-2616 section 13.
In order to change HTTP browser cache behavior, a "Cache-Control" HTTP header has to be added to static content HTTP responses returned by Undertow.
This is in the scenario where you want JBoss to handle the datasource and transactions, for example when using injected @PersistenceContext in a @Stateless resource. I like it especially when writing REST services with JAX-RS (example code included below).
Create dir:
/modules/org/postgresql/main
#!/usr/bin/env perl | |
# Copyright (c) 2015 Sergey Lyubka | |
# All rights reserved | |
use Encode; | |
my $dir = "/Users/$ENV{USER}/.Trash"; | |
sub read_file($) { local $/; open FD, $_[0] or die $_[0]; binmode FD; <FD>; } |
apply plugin: "java" | |
apply plugin: "eclipse" | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
compile ( | |
"org.jboss.netty:netty:latest.integration", |