Skip to content

Instantly share code, notes, and snippets.

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

Olaf Erlandsen olaferlandsen

🏠
Aló?
  • Chile
  • 22:35 (UTC -04:00)
View GitHub Profile
@olaferlandsen
olaferlandsen / app.js
Created January 14, 2019 07:57 — forked from daffl/app.js
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
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;
}
@olaferlandsen
olaferlandsen / android_instructions.md
Created March 15, 2017 19:06 — forked from patrickhammond/android_instructions.md
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)"

@olaferlandsen
olaferlandsen / install_ffmpeg_ubuntu.sh
Created May 26, 2016 03:39 — forked from xdamman/install_ffmpeg_ubuntu.sh
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