System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go
directory by:
//> using dep "org.http4s::http4s-scalatags::0.25.2" | |
//> using dep "org.http4s::http4s-dsl::0.23.23" | |
//> using dep "org.http4s::http4s-ember-server::0.23.23" | |
//> using dep "org.tpolecat::skunk-core::0.6.0" | |
//> using dep "com.dimafeng::testcontainers-scala-postgresql::0.41.0" | |
//> using dep "com.outr::scribe-slf4j::3.12.2" | |
import skunk.*, codec.all.*, syntax.all.* | |
import cats.effect.* | |
import scalatags.Text.all.* |
# Minimal example of getting a PostgREST API running from scratch for | |
# testing purposes. It uses docker to launch a postgres database and | |
# a postgrest api server. | |
# This should not be used to deploy a production system but to | |
# understand how postgrest works. In particular there is no security | |
# implemented, see the docs for more. | |
# https://postgrest.org/en/v4.4/ |
[[source]] | |
url = "https://pypi.python.org/simple" | |
verify_ssl = true | |
name = "pypi" | |
[packages] | |
SQLAlchemy = "*" | |
"psycopg2-binary" = "*" | |
[dev-packages] |
#!/usr/bin/env python | |
import elasticapm | |
from elasticapm.contrib.flask import ElasticAPM | |
from flask import Flask | |
# initialize using environment variables from elasticapm.contrib.flask import ElasticAPM | |
app = Flask(__name__) |
#!/usr/bin/env sh | |
# Works with merlin version 2.5.4. Using protocol described at | |
# https://github.com/ocaml/merlin/blob/master/doc/dev/OLD-PROTOCOL.md#type-checking | |
usage () | |
{ | |
echo Usage: either of the following will work: | |
echo | |
echo ' sig module.ml' |
System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go
directory by:
You got your hands on some data that was leaked from a social network and you want to help the poor people.
Luckily you know a government service to automatically block a list of credit cards.
The service is a little old school though and you have to upload a CSV file in the exact format. The upload fails if the CSV file contains invalid data.
The CSV files should have two columns, Name and Credit Card. Also, it must be named after the following pattern:
YYYYMMDD
.csv.
# -*- coding: utf-8; -*- | |
from tigger import app | |
app.ready() | |
from tigger import db | |
def decorate_timestamps(): | |
from datetime import datetime | |
from sqlalchemy import TIMESTAMP, Column, text |
Here are my attempts to script an IntelliJ-based IDE using javax.script.*
API (ex-JSR-223).
The list of available scripting languages and engines:
<app>/lib/groovy-jsr223-xxx.jar
<app>/jbr/...
(deprecated and will be removed soon)It's over 9 years old (as of 2024-02-18), there are many better guides! You might like https://rust-unofficial.github.io/too-many-lists/
% Let's build a binary tree!
Let's build a binary tree of strings in Rust. To recap, each node in a binary tree: