Skip to content

Instantly share code, notes, and snippets.

View wdullaer's full-sized avatar
🏠
ThingHandlerFactory

wdullaer

🏠
ThingHandlerFactory
View GitHub Profile
@raine
raine / heroku-logs-with-bunyan.md
Last active August 3, 2018 19:14
Read heroku log output with bunyan

Read heroku logs output w/ bunyan

The stuff before the JSON in heroku logs output has to be cut off for bunyan to work.

$ heroku logs | sed -l 's/.*app\[web\..*\]\: //' | bunyan

Flag -l makes the output buffered by line.

@Shywim
Shywim / CursorRecyclerAdapter.java
Last active February 27, 2024 13:42
A custom Adapter for the new RecyclerView, behaving like the CursorAdapter class from previous ListView and alike. Now with Filters and updated doc.
/*
* The MIT License (MIT)
*
* Copyright (c) 2014 Matthieu Harlé
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@parente
parente / install_latest_docker.sh
Last active February 6, 2022 17:35
Install Docker latest on Ubuntu 14.04 with AUFS as the storage driver
#!/bin/bash
sudo apt-get update
sudo apt-get -y install linux-image-extra-$(uname -r)
sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -"
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main\ > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get -y install lxc-docker
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active March 8, 2024 02:11
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
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