Skip to content

Instantly share code, notes, and snippets.

Working with Ionic 4

Nigel B. Peck nigelbpeck

Working with Ionic 4
Block or report user

Report or block nigelbpeck

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Bloggerschmidt / location.ts
Last active Apr 5, 2019
start external map navigation from ionic 2 app for ios and android; needs cordova-plugin-geolocation
View location.ts
startExternalMap() {
if (this.location.latitude) {
this.platform.ready().then(() => {
Geolocation.getCurrentPosition().then((position) => {
// ios
if ('ios')) {'maps://?q=' + + '&saddr=' + position.coords.latitude + ',' + position.coords.longitude + '&daddr=' + this.location.latitude + ',' + this.location.longitude, '_system');
// android
if ('android')) {
amtinits / http.conf
Created Dec 12, 2011
Get logwatch to pick up nginx logs - put this in /etc/logwatch/conf/logfiles/
View http.conf
LogFile = nginx/*access.log
LogFile = nginx/*access.log.1
Archive = nginx/*access.log.*.gz
# Expand the repeats (actually just removes them now)
# Keep only the lines in the proper date range...
fevangelou /
Last active Sep 10, 2019
The perfect Varnish configuration for Joomla, WordPress & other CMS based websites

The perfect Varnish configuration for Joomla, WordPress & other CMS based websites

IMPORTANT: Read this before implementing one of the configuration files below (for either Varnish 3.x or 4.x+).

USE: Replace the contents of the main Varnish configuration file located in /etc/varnish/default.vcl (root server access required - obviously) with the contents of the configuration you'll use (depending on your Varnish version) from the 2 examples provided below.

IMPORTANT: The following setup assumes a 3 minute (180 sec) cache time. You can safely increase this to 5 mins for less busier sites or drop it to 1 min or even 30s for high traffic sites.

This configuration requires an HTTP Header and a user cookie to identify if a user is logged in a site, in order to bypass caching overall (see how it's done in the Joomla section). If your CMS provides a way to add these 2 requirements, then you can use this configuration to speed up your site or entire server. You can even exclude the domains you don't want to cach

Nilpo / Using Git to Manage a Live Web
Last active Sep 18, 2019
Using Git to Manage a Live Web Site
View Using Git to Manage a Live Web

Using Git to Manage a Live Web Site


As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.


You can’t perform that action at this time.