Skip to content

Instantly share code, notes, and snippets.

View emilfolino's full-sized avatar

Emil Folino emilfolino

View GitHub Profile
Anax: Uncaught exception:
Call to undefined function Anax\Url\mb_strtolower()
Code: 0
#0 /home/efo/htdocs/dbwebb.se/vendor/mos/anax/src/Content/CFileBasedContent.php(843): Anax\Url\CUrl->slugify('')
#1 /home/efo/htdocs/dbwebb.se/vendor/mos/anax/src/Content/CFileBasedContent.php(866): Anax\Content\CFileBasedContent->contentForInternalRoute('')
#2 /home/efo/htdocs/dbwebb.se/vendor/mos/anax/config/routes/default.php(13): Anax\Content\CFileBasedContent->contentForRoute()
#3 [internal function]: Anax\App\CAnaxDefault->{closure}()
@emilfolino
emilfolino / gist:139a871d19a5dce59a8939a3ee771d7e
Created October 1, 2018 09:17
pylint: error: no such option: -s
WARNING pylint failed: './example/cgi/execute-another-file.cgi'
Usage: pylint [options] module_or_package
Check that a module satisfies a coding standard (and more !).
pylint --help
Display this help message and exit.
pylint --help-msg <msg-id>[,<msg-id>]
function _makefile_targets {
local curr_arg;
local targets;
# Find makefile targets available in the current directory
targets=''
if [[ -e "$(pwd)/Makefile" ]]; then
targets=$( \
grep -oE '^[a-zA-Z0-9_-]+:' Makefile \
| sed 's/://' \
@emilfolino
emilfolino / log-gui-inspect.ansi
Created March 14, 2019 10:29
log-gui-inspect.ansi
---> Run container= with what= one off command.
[ ! -f docker-compose.yaml ] || docker-compose -f docker-compose.yaml run cli make inspect what=kmom06 options='--yes'
Pulling cli (dbwebb/courserepo:cli)...
cli: Pulling from dbwebb/courserepo
---> Execute dbwebb inspect what=kmom01.
env PATH='/home/dbwebb/repo/bin:/home/dbwebb/repo/vendor/bin:/home/dbwebb/repo/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' bin/dbwebb-inspect --yes . kmom06
#
# Thu Mar 14 10:26:53 UTC 2019
# dbwebb-inspect version v2.4.0 (2019-03-05)
#
@emilfolino
emilfolino / log-gui-main.ansi
Created March 14, 2019 10:30
log-gui-main.ansi
>>> ======= GUI Inspect =======
Thu Mar 14 11:26:22 CET 2019
algn18 kmom06
download, docker
Inspect GUI v1.3.1 (2019-03-12)
http://www.student.bth.se/~algn18/dbwebb-kurser/databas/me/redovisa
@emilfolino
emilfolino / super-correct
Created April 10, 2019 06:09
super-correct
#!/usr/bin/env bash
PASS=$(pass BTH\ Studkonto)
ssh [email protected] -i /home/efo/.ssh/dbwebb.pub -t "echo $PASS | sudo -S setpre-dbwebb-kurser.bash $3"
dbwebb --yes inspect $1 $2 $3
0|app | ::ffff:127.0.0.1 - - [11/Apr/2019:10:52:19 +0000] "GET /v2/orders?api_key=6d7459cbc693d238e7a9eb9a1dae1bce HTTP/1.1" 304 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"
0|app | ::ffff:127.0.0.1 - - [11/Apr/2019:10:52:24 +0000] "PUT /v2/orders HTTP/1.1" 204 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"
0|app | ::ffff:127.0.0.1 - - [11/Apr/2019:10:52:24 +0000] "PUT /v2/products HTTP/1.1" 401 108 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"
0|app | ::ffff:127.0.0.1 - - [11/Apr/2019:10:52:24 +0000] "PUT /v2/products HTTP/1.1" 401 108 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"
0|app | ::ffff:127.0.0.1 - - [11/Apr/2019:10:53:05 +0000] "GET /v2/products?api_key=6d7459cbc693d238e7a9eb9a1dae1bce HTTP/1.1" 304 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0"
0|app | ::ffff:127.0.0.1 -
> !"hej hopp"
false
> !process.env.node
true
> !process.env.node == "production"
false
> !process.env.node == "development"
false
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> !"hej hopp"
File "<stdin>", line 1
!"hej hopp"
^
SyntaxError: invalid syntax
>>>
@emilfolino
emilfolino / grid_to_geodetic.js
Last active May 17, 2019 06:07
rt90 to wgs84
var axis = null;
var flattening = null;
var lat_of_origin = null;
var central_meridian = null;
var scale = null;
var false_northing = null;
var false_easting = null;
function math_cosh(value) {
return 0.5 * (Math.exp(value) + Math.exp(-value));