SELECT price_cents FROM products ORDER BY price_cents * ('{"EUR": 2.0}'::jsonb->'EUR')::jsonb::numeric;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com> | |
Copyright 2021 Pioz <epilotto@gmx.com> | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 2 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gem install google-apis-sheets_v4 | |
require 'google/apis/sheets_v4' | |
scope = Google::Apis::SheetsV4::AUTH_SPREADSHEETS.freeze | |
spreadsheets_id = '1ga77r2sjPYTSLGh1IXClnGPvdqFAmkRf-Z5akqfpFEo'.freeze | |
authorizer = Google::Auth::ServiceAccountCredentials.make_creds( | |
json_key_io: File.open('./credentials.json'), | |
scope: scope | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"encoding/gob" | |
"fmt" | |
"github.com/bradfitz/gomemcache/memcache" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parse_git_branch() { | |
test -d .git && echo "($(git rev-parse --abbrev-ref HEAD)) " | |
} | |
# PS1='\u@\h:\W $(parse_git_branch)\$ ' without colors | |
PS1='\e[0;33m\u@\h\e[m:\W \e[0;36m$(parse_git_branch)\e[m\e[0;33m\$\e[m ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
go test -coverprofile cover.out | |
go tool cover -html=cover.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Enkin è un mago. Ha passato molti anni a studiare presso svariate accademie di | |
magia in tutto l'occidente. Nonostante la sua ampia conoscenza teorica sulla | |
magia è uno pratico. È sfacciato di fronte al pericolo, gli piace rischiare, | |
impulsivo nelle scelte ed è disposto a qualsiasi cosa per difendere i suoi | |
compagni e per portare a termine la sua missione. La magia per Enkin è una | |
passione, vive per la magia, e forse per lui è anche una ossessione. Quando si | |
mette in viaggio in cerca di avventura, non lo fa per la gloria, la fama o il | |
danaro, lo fa per aumentare il suo sapere magico, scoprire nuovi incantesimi, | |
perfezionare la sua arte magica. Possiamo dire che se si trovasse di fronte a | |
un djinn e dovesse esprimere 3 desideri il primo sarebbe diventare il più |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerName example.com | |
Redirect permanent / https://example.com/ | |
ErrorLog /var/log/apache2/example-error.log | |
CustomLog /var/log/apache2/example-access.log combined | |
ServerSignature Off | |
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DB="italian_spiderman" | |
CHARSET="utf8mb4" | |
COLL="utf8mb4_unicode_ci" | |
echo $DB | |
echo "ALTER DATABASE \`$DB\` CHARACTER SET $CHARSET COLLATE $COLL;" | mysql | |
echo "USE \`$DB\`; SHOW TABLES;" | mysql -s | ( |