Skip to content

Instantly share code, notes, and snippets.

Anthony Madhvani octagonal

  • EU, Belgium
Block or report user

Report or block octagonal

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View auth.config.js
var express = require('express');
var session = require('express-session');
var RedisStore = require('connect-redis')(session);
var Strategy = require('./passport-openidconnect/index').Strategy;
module.exports.configure = function configure(app, passport) {
var identityServer = 'https://users.xxx.com/identity';
var auth = {
@forairan
forairan / PhpJava.java
Last active Jul 7, 2019
This snippet of code is syntactically valid in both PHP and Java, and produces the same output in both.
View PhpJava.java
/*<?php
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s",
//\u000A\u002F\u002A
class PhpJava {
static function main() {
echo(//\u000A\u002A\u002F
"Hello World!");
}}
//\u000A\u002F\u002A
PhpJava::main();
@hoetmaaiers
hoetmaaiers / overview.md
Last active Nov 30, 2018
Webstorm live templates
View overview.md

React Native Live Templates for WebStorm

How to add Live Template in Webstorm

  1. open preferences
  2. editor> live templates
  3. add template group for React Native
  4. add templates below to the new group
  5. define context > javascript
  6. edit variables > add "fileNameWithoutExtension" to "$fnName$"
@octagonal
octagonal / heroku_env.sh
Last active Jun 11, 2018
Some simple oneliners that make working with Heroku easier
View heroku_env.sh
# A collection of snippets for managing Heroku env vars
# It ain't pretty but it works
# Copy Heroku config to a local .env file
heroku config --app $HEROKU_APP | sed 's/: */=/' | tail -n +2 | tee $ENV_FILE
# Set a Heroku app's config from a local env file
# I got this oneliner from a blog somewhere, can't find it again
heroku config:set --app $HEROKU_APP $(cat .env | sed '/^$/d; /#[[:print:]]*$/d')
# Set a Heroku app's config from another Heroku app's config
You can’t perform that action at this time.