// jQuery
$(document).ready(function() {
// code
})| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| function processInboxToSheet() { | |
| //var threads = GmailApp.getInboxThreads(); | |
| // Have to get data separate to avoid google app script limit! | |
| var start = 0; | |
| var threads = GmailApp.getInboxThreads(start, 100); | |
| var sheet = SpreadsheetApp.getActiveSheet(); | |
| var result = []; | |
| for (var i = 0; i < threads.length; i++) { | |
| var messages = threads[i].getMessages(); |
(from Understanding Nginx Server and Location Block Selection Algorithms - https://goo.gl/YyzshP)
server {
| /* | |
| After purchasing a humble book bundle, go to your download page for that bundle. | |
| Open a console window for the page and paste in the below javascript | |
| */ | |
| $('a').each(function(i){ | |
| if ($.trim($(this).text()) == 'MOBI') { | |
| $('body').append('<iframe id="dl_iframe_'+i+'" style="display:none;">'); | |
| document.getElementById('dl_iframe_'+i).src = $(this).data('web'); | |
| } | |
| }); |
| {"help": "https://catalog.data.gov/api/3/action/help_show?name=package_search", "success": true, "result": {"count": 48, "sort": "views_recent desc", "facets": {}, "results": [{"license_title": "License not specified", "maintainer": "New Media", "relationships_as_object": [], "private": false, "maintainer_email": "[email protected]", "num_tags": 5, "id": "59694770-b6b6-4ae0-a4b9-4ae69c0be2f6", "metadata_created": "2016-07-02T10:06:26.199575", "metadata_modified": "2016-07-02T10:06:26.199575", "author": null, "author_email": null, "state": "active", "version": null, "creator_user_id": "47303a9e-1187-4290-85a3-1fc02dc49e4a", "type": "dataset", "resources": [{"cache_last_updated": null, "package_id": "59694770-b6b6-4ae0-a4b9-4ae69c0be2f6", "webstore_last_updated": null, "id": "3a8a0ad1-19e7-4153-bb2f-d70cf88aaaf8", "size": null, "state": "active", "hash": "", "description": "", "format": "CSV", "tracking_summary": {"total": 32, "recent": 1}, "last_modified": null, "url_type": null, "no_real_name": "True", |
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.
- There are always 24 hours in a day.
- February is always 28 days long.
- Any 24-hour period will always begin and end in the same day (or week, or month).
This snippet will convert a PEM based certificate of key to JSON format. This is useful when having to embed a certificate in a JSON object.
It will simply add \n in the required places.
The snipped was copied from here: https://docs.vmware.com/en/Unified-Access-Gateway/2.9/com.vmware.access-point-29-deploy-config/GUID-870AF51F-AB37-4D6C-B9F5-4BFEB18F11E9.html
NOTE: If you have Windows 11 there is now an official way to do this in WSL 2, use it if possible - see MS post here (WINDOWS 11 ONLY)
This guide will enable systemd to run as normal under WSL 2. This will enable services like microk8s, docker and many more to just work during a WSL session. Note: this was tested on Windows 10 Build 2004, running Ubuntu 20.04 LTS in WSL 2.
-
To enable
systemdunder WSL we require a tool calledsystemd-genie -
Copy the contents of
install-sg.shto a new file/tmp/install-sg.sh: