Skip to content

Instantly share code, notes, and snippets.

Avatar

merlos merlos

View GitHub Profile
@merlos
merlos / .bash_profile
Created Apr 7, 2020
Browser in dev mode OSX
View .bash_profile
echo adding alias chromecors
alias chromecors='/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-web-security --disable-gpu --user-data-dir=~/chromeTemp'
#
# Install extension in VSCode
# https://marketplace.visualstudio.com/items?itemName=firefox-devtools.vscode-firefox-debug
#
# Set Firefox Developer Editionto support debug mode
#
# In about:config
@merlos
merlos / GPX File example
Last active Aug 13, 2022
Example of GPX file
View GPX File example
<?xml version="1.0" encoding="UTF-8"?>
<gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.topografix.com/GPX/1/1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd" version="1.1" creator="Open GPX Tracker for iOS">
<wpt lat="40.762468446233115" lon="-73.99090283852468">
<time>2019-12-06T14:19:25Z</time>
<name>09:19:25</name>
<desc>Dec 6, 2019 at 09:19:25</desc>
</wpt>
<wpt lat="40.80559910750484" lon="-73.95810627601767">
<time>2019-12-06T14:19:29Z</time>
<name>09:19:29</name>
View Component.js
# Import the tree component
import {Tree} from 'untree-react'
class MyComponent extends React.Component {
constructor() {
//initialize the Tree
this.state.tree = {
name: "Node 1"
@merlos
merlos / SetSharePointCredentials.ps1
Created Oct 23, 2018
A PowerShell Script to set credentials as environment variables. Password is not stored as plain text.
View SetSharePointCredentials.ps1
# Description
# This Script sets Sharepoint Credentials as environment variables so
# you are not prompted on your script every time
#
# Usage
#
# PS> SetSharepointCredentials
#
# It will prompt the user to type site url, username, password. If it is successful
#
@merlos
merlos / Date+timeAgo.swift
Created Sep 23, 2018
Provides a humanised date. For instance: 1 minute, 1 week ago, 3 months ago.
View Date+timeAgo.swift
//
// Date+timeAgo.swift
// OpenGpxTracker
//
// Created by merlos on 23/09/2018.
//
// Based on this discussion: https://gist.github.com/minorbug/468790060810e0d29545
//
// If future dates are needed https://gist.github.com/jinthagerman/009c85b7bbd0a40dcbba747e89a501bf
//
@merlos
merlos / topdf.js
Last active Aug 9, 2018
Simple phantomJS script to create a PDF from a URL or a HTML file
View topdf.js
/**
* Simple script to create a PDF from a URL.
* Usage:
* $ phantomjs topdf.js
*
*/
var page = require('webpage').create();