Skip to content

Instantly share code, notes, and snippets.

View leog's full-sized avatar
☺️
Upbeat

Leo Giovanetti leog

☺️
Upbeat
View GitHub Profile
@leog
leog / Installation.md
Created September 14, 2018 15:12
Helios Documentation

Installation

This document concerns only the latest Helios v3.1 code, last updated on June 8th, 2011.

As of v3 beta (due in July 2010), Helios is no longer based on Google App Engine, but instead on a standard Django/Python + PostgreSQL stack. This document explains how to install Helios on a standard Linux machine, preferably Ubuntu 10.04.

Contributors: Ben Adida, Rodrigo Germán Fernández Gaete.

Components

  • Ubuntu Linux 10.04 (for these instructions, should be adaptable to other Linux distributions.)
  • PostgreSQL 8.3+ (may work with other databases, uses Django modeling, but not tested yet.)
@leog
leog / keybase.md
Created September 2, 2018 17:02
keybase.md

Keybase proof

I hereby claim:

  • I am leog on github.
  • I am leog (https://keybase.io/leog) on keybase.
  • I have a public key ASAniwQEwNNTLB5AR_-Lgqn7BZ221zzWX4xX0tACz_7uFAo

To claim this, I am signing this object:

@leog
leog / rule.js
Last active August 29, 2022 16:00
Auth0-Discourse SSO Rule
function (user, context, callback) {
// Check whether the Auth0 client is the one we want to apply this rule to
if(context.clientID === "CLIENT_ID") {
// Check out Discourse's SSO implementation requirements already in discourse-sso package
// at https://meta.discourse.org/t/official-single-sign-on-for-discourse-sso/13045#heading--implement
var discourse_sso = require('discourse-sso');
// Setup sso_secret variable on your client variables on Auth0 so you don't need to have it inline in your code
var sso = new discourse_sso(context.clientMetadata.sso_secret);
@leog
leog / gist:55f181af9ab9700b279b461e35351343
Created November 10, 2016 02:51
Markdown cheat sheet

Header 1

Header 2

Header 3 ### (Hashes on right are optional)

Header 4

Header 5

Markdown plus h2 with a custom ID ## {#id-goes-here}

Link back to H2

This is a paragraph, which is text surrounded by whitespace. Paragraphs can be on one

@leog
leog / firstModule.js
Created July 12, 2015 23:44
Very simple RequireJS modules defining AngularJS modules exporting their own module name
define(['angular'], function(angular) {
var settings = { moduleName: 'first' };
angular
.module(settings.moduleName, [])
.filter('greet', function() {
return function(name) {
return 'Hello, ' + name + '!';
}
});
return settings;
@leog
leog / firstModule.js
Created June 1, 2015 02:46
Very simple RequireJS modules defining AngularJS modules and injecting both as dependencies
define([‘angular’], function(angular) {
angular
.module(‘first’, [])
.filter(‘greet’, function() {
return function(name) {
return ‘Hello, ‘ + name + ‘!’;
}
});
});
@leog
leog / includingScripts.html
Created June 1, 2015 02:43
Including AngularJS modules scripts in the HTML
<script type=”text/javascript” src=”firstModule.js”></script>
<script type=”text/javascript” src=”secondModule.js”></script>
@leog
leog / secondModule.js
Last active August 29, 2015 14:22
Very simple AngularJS module to illustrate how to define a dependant module
angular
.module(‘second’, [‘first’])
.filter(‘goodbye’, function() {
return function(name) {
return ‘Good bye, ‘ + name + ‘!’;
}
});
@leog
leog / firstModule.js
Last active August 29, 2015 14:22
Very simple AngularJS module to illustrate how to define a stand-alone module
angular
.module(‘first’, [])
.filter(‘greet’, function() {
return function(name) {
return ‘Hello, ‘ + name + ‘!’;
}
});