Version: 1.9.8
Platform: x86_64
First, install or update to the latest system software.
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
// 1. find location latitude & longitude of desired location and name of location | |
// 2. call generate_gpx using previous data | |
// alternative, you can use http://gpx-poi.com to generate .gpx file | |
function generate_gpx(lat,lon,name,time='2017-07-01T02:24:02Z'){ | |
return `<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<gpx | |
xmlns="http://www.topografix.com/GPX/1/1" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
// The following could have been replaced by setting `Backbone.emulateHTTP = true;` | |
Backbone._sync = Backbone.sync; | |
Backbone.sync = function( method, model, options ) { | |
var beforeSend = options.beforeSend; | |
options = options || {}; | |
if ( method === "update" || method === "delete" || method === "patch" ) { | |
options.beforeSend = function( xhr ) { |
# pboblem : some applications can't be found using spotlight search box. | |
# solution : reload the metadata plist | |
# source : http://apple.stackexchange.com/questions/62715/applications-dont-show-up-in-spotlight | |
# Turn off spotlight | |
sudo mdutil -a -i off | |
# Unload it : | |
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist |
function Emitter(){ | |
this.events = {}; | |
} | |
Emitter.prototype.emit = function(eventType,data){ | |
this.events[eventType].map(function(callback){ | |
callback.call(null,data); | |
}); | |
} |
// A function for creating a new object that inherits from another | |
// method1: | |
// naked function to be used as a constructor | |
var Ctor = function(){}; | |
function cloneObj(srcObj){ | |
Ctor.prototype = srcObj; | |
var clone = new Ctor(); | |
Ctor.prototype = null; |
{ | |
"folders": | |
[ | |
{ | |
"path": ".", | |
"follow_symlinks": true, | |
"folder_exclude_patterns": ["bower_components", "node_modules"] | |
} | |
] | |
} |
var markdown = require( "markdown" ).markdown; | |
var markdownStr = ['#Hello World','somethig else','#another title'].join("\n"); | |
var htmlResult= markdown.toHTML(markdownStr); | |
var finalResult = htmlResult.replace(/<h1>/g,'<h3>'); | |
finalResult.replace(/<\/h1>/g,'</h3>'); |
//first.js | |
var util = require('util'), | |
EventEmitter = require('events'); | |
function First () { | |
EventEmitter.call(this) | |
} | |
util.inherits(First, EventEmitter); |
<?php | |
function to_french_format($date){ | |
$date = date("l d/m/Y h:i", strtotime($date)); | |
$date_components = split(' ',$date); | |
$french_days = array( | |
'Saturday'=>'Samedi', | |
'Sundy'=>'Dimanche', | |
'Monday'=>'Lundi', | |
'Tuesday'=>'Mardi', |