Skip to content

Instantly share code, notes, and snippets.

@Nilpo
Nilpo / MaidenHeadLocater.php
Last active April 6, 2023 09:44
Calculate Maidenhead Grid Square Locator from Latitude/Longitude coordinate pairs.
View MaidenHeadLocater.php
<?php
/**
* Calculates a Maidenhead Grid Square Locator containing
* the given latitude/longitude (WGS84) coordinate pair.
*
* @param string|float $input_lat
* @param string|float $input_lng
* @return string
*/
@Nilpo
Nilpo / .env
Last active December 7, 2022 18:27 — forked from gilbitron/CaddyController.php
Enabling HTTPS (SSL) for Laravel Sail using Caddy
View .env
APP_URL=https://laravel.test
APP_SERVICE=laravel.test
[...]
@Nilpo
Nilpo / git-aware-bash-prompt.md
Created April 5, 2022 02:00 — forked from eliotsykes/git-aware-bash-prompt.md
Git Aware Bash Prompt
View git-aware-bash-prompt.md
@Nilpo
Nilpo / How to passthrough SATA drives directly on VMWare ESXi 6.5 as RDMs.md
Last active July 13, 2020 00:16 — forked from Hengjie/tutorial.md
How to passthrough SATA drives directly on VMWare ESXi 6.5 as RDMs
View How to passthrough SATA drives directly on VMWare ESXi 6.5 as RDMs.md

How to passthrough SATA drives directly on VMWare ESXi 6.5 as RDMs

There aren't many tutorials about this, the only tutorials I've found were about passing through entire PCIe cards to VMs, or refered to old ESXi versions (below 6.5) that used a more comprehensive desktop client instead of the web app. In v6.5, the web app was introduced and the desktop client was deprecated. You used to be able to setup RDMs in the desktop client, but with the introduction of the web console, this is no longer the case. This tutorial shows you how to pass SATA HDDs to the virtual machine on VMWare ESXi 6.5. This tutorial is partially based on VMWare's own KB and the now deprecated Forza IT blog post.

A word about VMWare ESXi 6.7

There is now an option while editing your VM's settings to add a New raw disk when you click `Add ha

@Nilpo
Nilpo / download.py
Created October 26, 2019 03:44 — forked from triple-j/download.py
Download file through HTTP using requests.py and tqdm
View download.py
import os.path
from urllib.request import urlopen
import requests
from tqdm import tqdm
def download_from_url(url, dst):
"""
@param: url to download file
@param: dst place to put the file
@Nilpo
Nilpo / animated-favicons.js
Created October 11, 2019 03:25
Animating Favicons with jQuery
View animated-favicons.js
var favicon_images = [
'http://website.com/img/tmp-0.gif',
'http://website.com/img/tmp-1.gif',
'http://website.com/img/tmp-2.gif',
'http://website.com/img/tmp-3.gif',
'http://website.com/img/tmp-4.gif',
'http://website.com/img/tmp-5.gif',
'http://website.com/img/tmp-6.gif'
],
image_counter = 0; // To keep track of the current image
@Nilpo
Nilpo / BibleWorksHebrew.md
Last active August 5, 2022 10:17 — forked from bgrainger/BibleWorksHebrew.md
BibleWorks Hebrew Mapping Table
View BibleWorksHebrew.md
@Nilpo
Nilpo / GitHub-Forking.md
Created April 24, 2019 06:41 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow
View GitHub-Forking.md

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@Nilpo
Nilpo / post-WSL.md Installing node via windows subsystem for linux
View post-WSL.md

Windows 10 Fall Creators Update - Installing Node.js on Windows Subsystem for Linux (WSL)

Windows just released the windows subsystem for linux feature to the public with its latest windows fall creator update, if you are not familiar with this feature it allows you to run linux binaries natively on windows - F.A.Q.

Enabling WSL

The feature is not enabled by default and you need to activate it, you can do it via powershell (with admin rights):

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Or you can open: Control-Panel -> Programs -> Turn Windows feature on ro off, and click the "windows subsystem for linux (beta)" button.