Skip to content

Instantly share code, notes, and snippets.

View ekryski's full-sized avatar

Eric Kryski ekryski

View GitHub Profile
@marshallswain
marshallswain / readme.md
Created April 17, 2017 12:40
FeathersJS: Better permissions

Better Permissions Control

We have introduced 3 new hooks and 2 new middleware as part of feathers-permissions that give you much more flexibility and control over access permissions than was previously possible. Permissions are stored in the database on the entity record that needs to have access permissions checked (typically a user). They look like this:

[
    '*', // all services, all methods, all docs
    'users:*', // all methods on users service
    'users:remove:*', // can remove any user
    '*:remove', // can remove on any service
@mAAdhaTTah
mAAdhaTTah / 1_netatalk-3-install-on-ubuntu-14.04.sh
Last active December 11, 2019 16:20 — forked from beshkenadze/1_netatalk-3-install-on-debian-7
Shell script to install Netatalk 3 on Ubuntu 14.04
# Get root:
sudo su
# Install prerequisites:
apt-get install build-essential pkg-config checkinstall git avahi-daemon libavahi-client-dev libcrack2-dev libwrap0-dev autotools-dev automake libtool libdb-dev libacl1-dev libdb5.1-dev db-util db5.1-util libgcrypt11 libgcrypt11-dev
# Build libevent from source:
cd /usr/local/src
@kmiyashiro
kmiyashiro / admin.html
Created May 10, 2012 21:02
Mocha HTML spec
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="../libs/mocha.css" type="text/css" media="screen" title="no title" charset="utf-8">
</head>
<body>
<div id="mocha"></div>
<script src="../libs/mocha.js" type="text/javascript" charset="utf-8"></script>
@joshbirk
joshbirk / samplerest.js
Created February 3, 2012 19:57
Sample of using passport w/ mult strategies
var fs = require("fs")
var ssl_options = {
key: fs.readFileSync('privatekey.pem'),
cert: fs.readFileSync('certificate.pem')
};
var port = process.env.PORT || 3000;
var express = require('express');
var ejs = require('ejs');
var passport = require('passport')
@hagino3000
hagino3000 / main.cpp
Created July 19, 2011 15:14
Control Kinect tilt motor by OpenNI USB Interface
#include <stdlib.h>
#include <stdexcept>
#include <iostream>
#include <XnCppWrapper.h>
#include <XnUSB.h>
#define VID_MICROSOFT 0x45e
#define PID_NUI_MOTOR 0x02b0
XN_USB_DEV_HANDLE dev;
@njvitto
njvitto / deploy.rake
Created April 11, 2010 16:56 — forked from RSpace/deploy.rake
Rakefile to deploy and rollback to Heroku in two different environments (staging and production) for the same app
#Deploy and rollback on Heroku in staging and production
task :deploy_staging => ['deploy:set_staging_app', 'deploy:push', 'deploy:restart', 'deploy:tag']
task :deploy_production => ['deploy:set_production_app', 'deploy:push', 'deploy:restart', 'deploy:tag']
namespace :deploy do
PRODUCTION_APP = 'YOUR_PRODUCTION_APP_NAME_ON_HEROKU'
STAGING_APP = 'YOUR_STAGING_APP_NAME_ON_HEROKU'
task :staging_migrations => [:set_staging_app, :push, :off, :migrate, :restart, :on, :tag]
task :staging_rollback => [:set_staging_app, :off, :push_previous, :restart, :on]