Skip to content

Instantly share code, notes, and snippets.

Deploying Julia on heroku

Let's assume that you can run your web server on your own computer, and that you can open it in your own browser (through localhost or 127.0.0.1). This guide will go through the steps of putting that app online!

This guide will be based on a hello world sample project that uses Genie.jl, but the steps from this guide apply to any Julia web framework.

heroku has tons of features, but for a simple app, we only need the basics. In particular, we do not need the heroku command line, we can do everything through the online GUI.

Basics

heroku uses git for deployment: to package your app, you create a git repository, and to put a new version of your app online, you push to the git repository. If you already know git, then you now know how to manage a web server! It's like GitHub pages, but more powerful (and more complicated). Read heroku's introduction for a basi

@amilos
amilos / bg-psd2.yaml
Last active May 24, 2024 08:01
Berlin Group PSD2 API specified in Openapi v3 format
openapi: 3.0.1
info:
title: BG PSD2 API
version: "1.2"
description: |
# Summary
The **NextGenPSD2** *Framework Version 1.2* offers a modern, open, harmonised and interoperable set of
Application Programming Interfaces (APIs) as the safest and most efficient way to provide data securely.
The NextGenPSD2 Framework reduces XS2A complexity and costs, addresses the problem of multiple competing standards
in Europe and, aligned with the goals of the Euro Retail Payments Board,
@dopey
dopey / main.go
Last active June 26, 2024 13:38 — forked from denisbrodbeck/main.go
How to generate secure random strings in golang with crypto/rand.
package main
import (
"crypto/rand"
"encoding/base64"
"fmt"
"io"
"math/big"
)
@raztud
raztud / sign.go
Last active January 25, 2024 01:39
Sign string with go and openssl
package main
/**
With openssl command:
# echo -n "string to sign" | openssl rsautl -inkey private.key -sign|base64
or with openssl + sha256 (if it is used SignSHA256 function)
# openssl dgst -sha256 -sign private.key -out sign.txt.sha256 <(echo -n "string to sign") ; cat sign.txt.sha256 | base64
With sign.go
@strickc
strickc / vsCodeVueESLint.md
Last active June 2, 2019 17:20
Configure VS Code for Vue.js component vue files for syntax highlighting and ESLint support within <script> tags
  1. Install ESLint VS Code extension

  2. Install Vue 2 Snippts VS Code extension

  3. Install eslint-plugin-html: npm install --save-dev eslint-plugin-html

  4. Add "plugins": ["html"] to eslintrc config file as per eslint-plugin-html instructions. Vue extension is enabled by default for the plugin.

  5. Open VS Code user settings and add vue to eslint.validate:

    "eslint.validate": [ "javascript", "javascriptreact", "vue" ]
    
@akirattii
akirattii / sse-serverside-example.js
Last active April 26, 2024 11:15
Server-Sent Events nodejs example. This shows how to detect the client disconnection.
var express = require('express');
var app = express();
// response header for sever-sent events
const SSE_RESPONSE_HEADER = {
'Connection': 'keep-alive',
'Content-Type': 'text/event-stream',
'Cache-Control': 'no-cache',
'X-Accel-Buffering': 'no'
};
@schmohlio
schmohlio / sse.go
Last active February 13, 2023 08:38 — forked from ismasan/sse.go
Example SSE server in Golang
// v2 of the great example of SSE in go by @ismasan.
// includes fixes:
// * infinite loop ending in panic
// * closing a client twice
// * potentially blocked listen() from closing a connection during multiplex step.
package main
import (
"fmt"
"log"
@santoshachari
santoshachari / Laravel PHP7 LEMP AWS.md
Last active February 20, 2024 10:00
Laravel 5.x on Ubuntu 16.x, PHP 7.x, Nginx 1.9.x

#Steps to install latest Laravel, LEMP on AWS Ubuntu 16.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.

Install PHP 7 on Ubuntu

Run the following commands in sequence.

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
@denji
denji / golang-tls.md
Last active July 1, 2024 05:41 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@xombra
xombra / TOKEN.php
Created June 17, 2014 22:23
Crear y verificar Token para evitar csrf
function CREAR_TOKEN($TokenForm)
{ $token = md5(uniqid(microtime(), true));
$token_time = time();
$_SESSION['csrf'][$TokenForm.'_token'] = array('token'=>$token, 'time'=>$token_time);
return $token;
}
function VERIFICA_TOKEN($TokenForm, $token)
{ if(!isset($_SESSION['csrf'][$TokenForm.'_token'])) {
return false;
}