Skip to content

Instantly share code, notes, and snippets.

View olaferlandsen's full-sized avatar
🏠
Aló?

Olaf Erlandsen olaferlandsen

🏠
Aló?
  • Chile
  • 04:51 (UTC -03:00)
View GitHub Profile
@loganvolkers
loganvolkers / Byte Formatting for Google Sheets.md
Last active December 19, 2024 09:33
Byte formatting for Google Sheets
@chris-garrett
chris-garrett / gist:8b9831ca2e2c05eacaa16b75f15213bf
Created December 13, 2017 00:40
initial nginx config for feathers.js
upstream app_server {
ip_hash;
server app_react:3000 max_fails=3 fail_timeout=30s;
}
upstream api_server {
ip_hash;
server api_feathers:3040 max_fails=3 fail_timeout=30s;
}
@daffl
daffl / app.js
Created June 28, 2017 15:06
Feathers Buzzard improved real-time event filtering dispatchers
app.service('messages').dispatch('eventname', (message, hook) => {
// Just dispatch to one user
if(message.isPrivate) {
return app.channel(message.receiver_id);
}
// Returning falsy or nothing will do nothing
});
// Send to a certain room
cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin.git
@xdamman
xdamman / install_ffmpeg_ubuntu.sh
Created July 2, 2014 21:03
Install latest ffmpeg on ubuntu 12.04 or 14.04
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
@patrickhammond
patrickhammond / android_instructions.md
Last active December 25, 2024 17:03
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

@pasupulaphani
pasupulaphani / after_res_hooks.js
Last active September 18, 2024 18:30
Mongoose connection best practices
var db = mongoose.connect('mongodb://localhost:27017/DB');
// In middleware
app.use(function (req, res, next) {
// action after response
var afterResponse = function() {
logger.info({req: req}, "End request");
// any other clean ups
@AshKyd
AshKyd / rfc2822.js
Last active October 7, 2023 19:42
A momentjs RFC2822 formatted date string.
var DATE_RFC2822 = "ddd, DD MMM YYYY HH:mm:ss ZZ";
moment().format(DATE_RFC2822);