With GnuPG 2.1.15
If you want to create an RSA or DSA key in a straight forward way use:
gpg --full-gen-key
If you want to use an ECC algorithm, you need to add the --expert flag
gpg --expert --full-gen-key
| -- Reasonably efficient pagination without OFFSET | |
| -- SQLite version (Adapted from MS SQL syntax) | |
| -- Source: http://www.phpbuilder.com/board/showpost.php?p=10376515&postcount=6 | |
| SELECT foo, bar, baz, quux FROM table | |
| WHERE oid NOT IN ( SELECT oid FROM table | |
| ORDER BY title ASC LIMIT 50 ) | |
| ORDER BY title ASC LIMIT 10 |
| <?php | |
| // Updated code from comments | |
| function encode($value) { | |
| if (!$value) { | |
| return false; | |
| } | |
| $key = sha1('EnCRypT10nK#Y!RiSRNn'); |
| #!/bin/bash | |
| # cronjob: | |
| # * * * * * /root/bin/watch-service apcupsd > /dev/null | |
| service=$@ | |
| /bin/systemctl -q is-active "$service.service" | |
| status=$? | |
| if [ "$status" == 0 ]; then | |
| echo "$service - OK" | |
| else |
| if [ ! -f .env ] | |
| then | |
| export $(cat .env | xargs) | |
| fi |
| # dump | |
| mysqldump -u user -p database --default-character-set=utf8mb4 --result-file=dump.sql | |
| # restore | |
| mysql -u user -p database --default-character-set=utf8mb4 < dump.sql |
| package main | |
| import ( | |
| "crypto/rand" | |
| "encoding/base64" | |
| "fmt" | |
| "io" | |
| "math/big" | |
| ) |
| Don't worry about what anybody else is going to do. The best way to | |
| predict the future is to invent it. | |
| -- Alan Kay | |
| Premature optimization is the root of all evil (or at least most of it) | |
| in programming. | |
| -- Donald Knuth | |
| Lisp has jokingly been called "the most intelligent way to misuse a | |
| computer". I think that description is a great compliment because it |
| package main | |
| import ( | |
| "fmt" | |
| "github.com/skratchdot/open-golang/open" | |
| "net" | |
| "net/http" | |
| ) | |
| func main() { |
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "text/template" | |
| ) | |
| type Person struct { | |
| Name string |