Skip to content

Instantly share code, notes, and snippets.

View osor0024's full-sized avatar

Natalia Osorio Cueto osor0024

View GitHub Profile
@osor0024
osor0024 / Sync gh-pages + master branches
Created November 11, 2019 00:39 — forked from mandiwise/Sync gh-pages + master branches
Keep gh-pages up to date with a master branch
// Reference: http://lea.verou.me/2011/10/easily-keep-gh-pages-in-sync-with-master/
$ git add .
$ git status // to see what changes are going to be commited
$ git commit -m 'Some descriptive commit message'
$ git push origin master
$ git checkout gh-pages // go to the gh-pages branch
$ git rebase master // bring gh-pages up to date with master
$ git push origin gh-pages // commit the changes
let app = {
fs: null,
canvas: null,
ctx: null,
output: null,
init: function () {
document.addEventListener('deviceready', () => {
//hopefully file plugin is loaded
let img = document.getElementById('logo');
app.canvas = document.getElementById('canvas');
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Content-Security-Policy</title>
<meta name="viewport" content="width=device-width">
<meta http-equiv="Content-Security-Policy"
content="default-src 'self' data: gap: 'unsafe-eval' ws: ;
style-src 'self' 'unsafe-inline';
script-src https: *.example.com ;
//https://www.npmjs.com/package/cordova-plugin-android-volume
//plugin to retrieve the android system volumes
//https://cordova.apache.org/docs/en/8.x/reference/cordova-plugin-media/index.html
// cordova media plugin
let app = {
track: {
src: 'file:///android_asset/www/media/fight-club.mp3',
title: 'Fight Club Rules',
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Star Rating System</title>
<meta name="viewport" content="width=device-width">
<style>
.star{
color: goldenrod;
font-size: 2.0rem;
<!DOCTYPE html>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>SPA Demo</title>
<style>
*{
padding:0;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
#canvas{
border: 1px solid red;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Canvas Rotation</title>
<style>
html{
background-color: #999;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Canvas Pie Charts</title>
<style>
canvas{
border: 2px solid #333;
margin: 2rem auto;