Skip to content

Instantly share code, notes, and snippets.

View Bernix01's full-sized avatar
:shipit:
Working from home

Guillermo Enrique Bernal Moreira Bernix01

:shipit:
Working from home
View GitHub Profile
@vitoo
vitoo / dni_portugal.js
Last active November 17, 2021 16:13
Generate DNI/NIF for Spain and Portugal, in javascript
//credit : https://github.com/asmarques/pt-id
function pad(value, length) {
var result = value + '';
while (result.length < length) {
result = '0' + result;
}
return result;
@beardedtim
beardedtim / wp-sync-tuts.md
Last active February 23, 2024 02:45
How to clone wordpress to local dev

In Terminal

  • cd into your Dev folder
  • git clone scotchbox folderName
  • change ** in vagrantfile line config.vm.network "private_network", ip: "192.168.33.**" to a new two digit number
  • open up hosts file (Finder -> Go -> Go To Folder - > /private/etc/hosts )
  • if you don't have access to edit that, create new plaintext doc
  • add new line with 192.168.33.** urlName.dev with ** being the two digit number you entered
  • if you used a new plaintext doc, override/replace /private/etc/hosts with new file
@kwk
kwk / README.md
Created October 1, 2014 13:52
Forgot to sign-off commits?

No problem,

run

git filter-branch --msg-filter "cat - && echo && echo 'Signed-off-by: Your Name <Your.Name@example.com>'" HEAD~2..HEAD

To sign-off the last two commits.

Then force to push them to the remote repo with the -f option: