A very basic regex-based Markdown parser. Supports the
following elements (and can be extended via Slimdown::add_rule()
):
- Headers
- Links
- Bold
- Emphasis
- Deletions
<?php | |
// API access key from Google API's Console | |
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' ); | |
$registrationIds = array( $_GET['id'] ); | |
// prep the bundle | |
$msg = array |
Examples of getting certificates from Let's Encrypt working on Apache, NGINX and Node.js servers.
I chose to use the manual method, you have to make a file available to verify you own the domain. Follow the commands from running
git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
<?php | |
/** | |
* A helper file for Laravel 5, to provide autocomplete information to your IDE | |
* Generated for Laravel 5.1.40 (LTS) on 2016-07-18. | |
* | |
* @author Barry vd. Heuvel <[email protected]> | |
* @see https://github.com/barryvdh/laravel-ide-helper | |
*/ | |
namespace { |
Note: Some of these shortcuts have been remapped for my own convenience (Preferences->Keymap). These are Mac shortcuts, just use the Windows/Linux equivalent of the Cmd/Option/Ctrl/Del keys.
####Search, Go to, Navigation ####
Cmd + P - Search file
Cmd + Shift + O - Search everywhere
(I swapped the above two recently because I use Cmd + P to search for files most of the time).
# http://stackoverflow.com/questions/5735666/execute-bash-script-from-url | |
bash <(curl -s http://mywebsite.com/myscript.txt) | |
# http://stackoverflow.com/questions/4642915/passing-parameters-to-bash-when-executing-a-script-fetched-by-curl | |
curl http://foo.com/script.sh | bash -s arg1 arg2 |
In this tutorial, I will be going over to how to deploy a Javascript app from start to finish using AWS and EC2. Recently, my partner Tu and I launched our app AlgoAcademy (a resource for reviewing algorithms and data structures) and we wanted to share with other developers some of the lessons we learned along the way.
Following this tutorial, you will have an application that has:
AppCache
(and possibly ServiceWorker
).As suggested on one of the Google Developers sites, one may use search params in start_url
of the manifest.json
to notify page about that it was launched in standalone mode: start_url: '/?standalone'
.
This works well unless your page uses AppCache
(or ServiceWorker
). In case of AppCache
, every url with different search params is treated as separate entry in cache. So if you have listed /
path in AppCache
and naively used start_url: '/?standalone'
in your manifest.json
, then your Web App won't work offline from the Home Screen.
_With ServiceWorker
, however, there is few ways to fix this directly in its code, like ignoreSearch
option for match()
method (currently not supported in Chromium) or just traversing cache entries manually and comparing new URL(event.request.url).pathname
with stored request `new URL(...).path