Skip to content

Instantly share code, notes, and snippets.

View sirdlx's full-sized avatar

Sir Charles White sirdlx

View GitHub Profile
@sirdlx
sirdlx / calendar.html
Created February 19, 2014 00:45
Custom Google calendar using jquery
<div class="post">
</div>
<script type="text/javascript">
$.ajax({
url: "https://www.google.com/calendar/feeds/****CALENDAR ID****/public/full?alt=json"
}).done(function(data) {
var html="";
$.each( data.feed.entry, function( i, eventData ) {
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-scroll-header-panel/core-scroll-header-panel.html">
<link rel="import" href="../core-pages/core-pages.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../paper-item/paper-item.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
<link rel="import" href="../notification-elements/notification-alert.html">
<link rel="import" href="../yt-video/yt-search-video.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
@sirdlx
sirdlx / designer.html
Created August 29, 2014 12:31
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
STARTUP_VERSION=1
PARTITION_MARK=/var/startup.partition.$STARTUP_VERSION
RESIZE_MARK=/var/startup.resize.$STARTUP_VERSION
# Repartition the disk to full size
function partition() {
start_sector=$(sudo fdisk -l | grep ^/dev/sda1 | awk -F" " '{ print $3 }')
cat <<EOF | sudo fdisk -c -u /dev/sda
d
@sirdlx
sirdlx / check.decimal.only.js
Created November 10, 2015 03:36
regex for two decimal spaces
var decimalOnly = /^\s*-?[1-9]\d*(\.\d{1,2})?\s*$/;
@sirdlx
sirdlx / webcoponents_support.js
Created April 17, 2016 18:02
conditionally load webcomponentsjs
var webComponentsSupported = ('registerElement' in document
&& 'import' in document.createElement('link')
&& 'content' in document.createElement('template'));
if (!webComponentsSupported) {
var wcPoly = document.createElement('script');
wcPoly.src = '/../bower_components/webcomponentsjs/webcomponents-lite.js';
wcPoly.onload = lazyLoadPolymerAndElements;
document.head.appendChild(wcPoly);
} else {