Install the OpenSSL on Debian based systems
sudo apt-get install openssl
package main | |
import ( | |
"fmt" | |
"github.com/golang/geo/s1" | |
"github.com/golang/geo/s2" | |
) | |
// https://blog.nobugware.com/post/2016/geo_db_s2_geohash_database/ |
Syntax: cat <filename> | jq -c '.[] | select( .<key> | contains("<value>"))'
Example: To get json record having _id equal 611
cat my.json | jq -c '.[] | select( ._id | contains(611))'
Remember: if JSON value has no double quotes (eg. for numeric) to do not supply in filter i.e. in contains(611)
None of what is written below is particularly original, however, I was unable to find a method documented on the internet at the time of writing that successfully created a kickstart driven CentOS 7 USB installer.
My interest was in doing this manually as I require this USB (image) to be created from a script. Therefore, I did not look into using ISO to USB applications - in addition, these typically do not allow custom kickstart files to be used.
Much of the process described below was found on the CentOS Wiki page on Installing from USB key, and from the Softpanorama page on the same subject. I thoroughly recommend reading all of the latter as it highlights the shortcomings/dangers associated with the steps below.
package main | |
import ( | |
"log" | |
"syscall" | |
"unsafe" | |
) | |
var ( | |
kernel32 = syscall.NewLazyDLL("kernel32.dll") |
#!/bin/bash | |
case $# in | |
0) | |
echo "Usage: $0 {start|stop}" | |
exit 1 | |
;; | |
1) | |
case $1 in | |
start) |
If anyone is interested in setting up their system to automatically (or manually) sign their git commits with their GPG key, here are the steps:
$ git config --global commit.gpgsign true
([OPTIONAL] every commit will now be signed)$ git config --global user.signingkey ABCDEF01
(where ABCDEF01
is the fingerprint of the key to use)$ git config --global alias.logs "log --show-signature"
(now available as $ git logs
)$ git config --global alias.cis "commit -S"
(optional if global signing is false)$ echo "Some content" >> example.txt
$ git add example.txt
$ git cis -m "This commit is signed by a GPG key."
(regular commit
will work if global signing is enabled)Manual de sobrevivência para fechar um aluguel em pouquíssimo tempo
Bem, se tu estás lendo este guia provavelmente estás numa situação delicada. Separação, ordem de despejo, o que for; tens pouquíssimos dias para arranjar um lugar para morar. Baseado na minha experiência, resolvi montar este guia com dicas para auxiliar nesta procura e fechar um aluguel, bem como todos os preparativos para a mudança.
Primeiro de tudo, você terá de desenvolver algumas habilidades pessoais ESSENCIAIS tais como:
require 'bundler/setup' | |
require 'fiber' | |
require 'csv' | |
require 'pp' | |
require 'eventmachine' | |
def a_slow_api_call(row) | |
sleep 0.3 | |
row.collect(&:to_i).inject(&:+) |