As configured in my dotfiles.
start new:
tmux
start new with session name:
As configured in my dotfiles.
start new:
tmux
start new with session name:
package main | |
import ( | |
"fmt" | |
"github.com/veandco/go-sdl2/sdl" | |
"os" | |
) | |
var winTitle string = "Go-SDL2 Events" | |
var winWidth, winHeight int = 800, 600 |
val n = 9 | |
val s = Math.sqrt(n).toInt | |
type Board = IndexedSeq[IndexedSeq[Int]] | |
def solve(board: Board, cell: Int = 0): Option[Board] = (cell%n, cell/n) match { | |
case (r, `n`) => Some(board) | |
case (r, c) if board(r)(c) > 0 => solve(board, cell + 1) | |
case (r, c) => | |
def guess(x: Int) = solve(board.updated(r, board(r).updated(c, x)), cell + 1) | |
val used = board.indices.flatMap(i => Seq(board(r)(i), board(i)(c), board(s*(r/s) + i/s)(s*(c/s) + i%s))) |
This gist contains lists of modules available in
in AWS Lambda.
CREATE FUNCTION point_in_polygon(point_x float, point_y float, polygon_wkt varchar(max)) | |
RETURNS boolean IMMUTABLE AS | |
$$ | |
### begin section copied from http://geospatialpython.com/2011/08/point-in-polygon-2-on-line.html (I modifed to return boolean) | |
# Improved point in polygon test which includes edge | |
# and vertex points | |
def point_in_poly(x,y,poly): |
import javax.crypto.Mac | |
import javax.crypto.spec.SecretKeySpec | |
Object HMACgen { | |
def generateHMAC(sharedSecret: String, preHashString: String): String = { | |
val secret = new SecretKeySpec(sharedSecret.getBytes, "SHA256") //Crypto Funs : 'SHA256' , 'HmacSHA1' | |
val mac = Mac.getInstance("SHA256") | |
mac.init(secret) | |
val hashString: Array[Byte] = mac.doFinal(preHashString.getBytes) |
This guide uses the domain your-domain.tld
and its www.
prefixed version.
It starts the rocket application on 127.0.0.1:1337
and as the user www-data
. The proxy listens on port 80 and 443 though.
If you need other values, update them accordingly in your nginx and systemd configs.
/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉
~/.ssh/config
, set each ssh key for each repository as in this exemple: