Skip to content

Instantly share code, notes, and snippets.

View henrytriplette's full-sized avatar
🦦
Unfortunately I may be slow to respond.

Henry Triplette henrytriplette

🦦
Unfortunately I may be slow to respond.
View GitHub Profile
@henrytriplette
henrytriplette / laravel-homestead-win10.md
Last active June 30, 2020 09:32
Laravel Homestead - Install on a per project base on Win10

Install Laravel Homestead on Win10

  • Use Git Bash as your command prompt

  • Official Instructions [LINK]

  • Install Oracle Virtualbox [LINK]

  • Install Vagrant [LINK]

  • Add Homestead into Vagrant:

@henrytriplette
henrytriplette / table_options.md
Created September 12, 2019 09:31
Wordpress $table_options migration fix

RENAME tablewp_commentmetaTOmistrello_commentmeta; RENAME tablewp_commentsTOmistrello_comments; RENAME tablewp_linksTOmistrello_links; RENAME tablewp_optionsTOmistrello_options; RENAME tablewp_postmetaTOmistrello_postmeta; RENAME tablewp_postsTOmistrello_posts; RENAME tablewp_termsTOmistrello_terms; RENAME tablewp_termmetaTOmistrello_termmeta; RENAME tablewp_term_relationshipsTOmistrello_term_relationships; RENAME tablewp_term_taxonomyTOmistrello_term_taxonomy;

@henrytriplette
henrytriplette / MediaWiki.md
Created May 10, 2019 10:28
MediaWiki Snippets

Password

Reset user password from console. No email needed,

php changePassword.php --user=target_username --password=new_password
@henrytriplette
henrytriplette / diskpart.md
Created April 24, 2019 20:33
Windows 10 - Remove recovery partition using diskpart

From admin console, run

diskpart

then:

DISKPART> list disk
DISKPART> select disk 5

Disk 4 is now the selected disk.
@henrytriplette
henrytriplette / setupautolaunch.md
Last active March 2, 2019 23:44
RaspberryPi: Python Script launch on boot

How to setup script autolaunch

Start from home base directory

nano launcher.sh

Then type

#!/bin/sh
@henrytriplette
henrytriplette / RaspberryPi Clean VarCache.md
Last active May 3, 2019 09:52
RaspberryPi Clean Var/Cache

List Free Space

df -Bm 

List Space by usage

sudo du -xh / | grep -P "G\t"
@henrytriplette
henrytriplette / consolelog.js
Created November 14, 2018 16:43
Console.log
console.log("%cHenna"," text-shadow: 0 1px 0 #ccc,0 2px 0 #c9c9c9,0 3px 0 #bbb,0 4px 0 #b9b9b9,0 5px 0 #aaa,0 6px 1px rgba(0,0,0,.1),0 0 5px rgba(0,0,0,.1),0 1px 3px rgba(0,0,0,.3),0 3px 5px rgba(0,0,0,.2),0 5px 10px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.2),0 20px 20px rgba(0,0,0,.15);font-size:5em")
@henrytriplette
henrytriplette / hypervision not running.md
Last active November 8, 2018 15:14
Docker: Hypervision not running - Hypervision non è in esecuzione
  1. Run bcdedit in CMD
  2. Check hypervisorlaunchtype
  3. If is set to off run bcdedit /set hypervisorlaunchtype auto
  4. Reboot
  5. ???
  6. Enjoy
@henrytriplette
henrytriplette / FormatMoney.js
Created September 27, 2018 08:01
European money format function in javascript
// Format value as money [1234.55 => 1.234,55]
function formatMoney(n, c, d, t) {
var c = isNaN(c = Math.abs(c)) ? 2 : c,
d = d == undefined ? "," : d,
t = t == undefined ? "." : t,
s = n < 0 ? "-" : "",
i = String(parseInt(n = Math.abs(Number(n) || 0).toFixed(c))),
j = (j = i.length) > 3 ? j % 3 : 0;
return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : "");
ipconfig /release
ipconfig /flushdns
ipconfig /renew
netsh winsock reset
netsh interface ipv4 reset
netsh interface ipv6 reset
netsh winsock reset catalog
netsh int ipv4 reset reset.log
netsh int ipv6 reset reset.log