Skip to content

Instantly share code, notes, and snippets.

@robhoare
robhoare / gist:6f6b3fa96795340dc4fd8214aebd861e
Last active March 27, 2022 04:54
Calcular el noveno dígito de un DNI peruano
Calculate the ninth digit of a Peruvian DNI (English description after Spanish)
Espanol:
Calcular el noveno dígito de un DNI peruano
===========================================
Multiplica cada dígito del DNI por el dígito correspondiente en:
3 2 7 6 5 4 3 2
Ejemplo DNI: 4 2 3 8 8 6 0 4
@robhoare
robhoare / gist:b13970e6ae288081647dfb60b6d5c00f
Created August 13, 2017 03:35
Connect to wifi on command line, ubuntu 16.04
nmcli device wifi connect <ssid> password <password>
@robhoare
robhoare / pullall.sh
Last active July 23, 2017 01:29
Update (git pull) all git repos that are directly below the current directory
for i in $(ls -d */); do echo ${i%%/}; cd ${i%%/}; git pull; cd ..; done

Keybase proof

I hereby claim:

  • I am robhoare on github.
  • I am robhoare (https://keybase.io/robhoare) on keybase.
  • I have a public key whose fingerprint is 1668 75D5 B2BA 3352 2AEB 828E 69DC DE91 7F1F 5A83

To claim this, I am signing this object:

Verifying that +robhoare is my blockchain ID. https://onename.com/robhoare
@robhoare
robhoare / logip.md
Last active August 29, 2015 14:26
Apache: Log IP correctly when using a CDN

#Apache: Log IP correctly when using a CDN

(assumes Ubuntu)

##Edit Config

in /etc/apache2/apache2.conf

after HostnameLookups Off add

@robhoare
robhoare / eu-iso.md
Last active August 29, 2015 14:26
ISO Codes of Countries and Territories in/near the European Union

#ISO Codes of Countries and Territories in/near the European Union For purposes like the EU cookie law, it's useful to know what countries and territories could be considered to be within the EU. I've erred on the side of over-inclusiveness in the following lists, rather than being legally precise.

For each country or territory, I've given the ISO code as you would get from IP locators like Maxmind.

@robhoare
robhoare / finfo
Last active August 29, 2015 14:19
Count all files in a directory and it's subdirectories
ls -R -1 $1 | wc -l
@robhoare
robhoare / sed
Created January 20, 2015 06:33
Sed Notes
-------------------------------------------------------------------------
USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) Dec. 29, 2005
Compiled by Eric Pement - pemente[at]northpark[dot]edu version 5.5
Latest version of this file (in English) is usually at:
http://sed.sourceforge.net/sed1line.txt
http://www.pement.org/sed/sed1line.txt
This file will also available in other languages:
Chinese - http://sed.sourceforge.net/sed1line_zh-CN.html
@robhoare
robhoare / edward,json
Created January 18, 2015 04:33
Example of Familysearch json for a marriage
{
"metadata": {
"externalId": [
{
"value": "291562957",
"type": "org.familysearch.easy.record_id"
}
],
"format": {
"value": "application/sord+xml"