Skip to content

Instantly share code, notes, and snippets.

View eduardochiaro's full-sized avatar
🏠
Working from home

Eduardo Chiaro eduardochiaro

🏠
Working from home
View GitHub Profile
@eduardochiaro
eduardochiaro / AppDelegate.swift
Created July 3, 2017 15:48
Xcode 8.3, Swift 3.1 - Using common SQLite database as persistent container.
lazy var persistentContainer: NSPersistentContainer = {
let sqlitePath = Bundle.main.url(forResource: "DATABASE_NAME", withExtension: "sqlite")
if FileManager.default.fileExists(atPath: sqlitePath!.path) {
let container = NSPersistentContainer(name: "DATABASE_NAME")
let description = NSPersistentStoreDescription(url: sqlitePath!)
description.shouldInferMappingModelAutomatically = true
<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-icons/core-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../paper-ripple/paper-ripple.html">
<polymer-element name="my-element">
<template>
@eduardochiaro
eduardochiaro / gist:1885745
Created February 22, 2012 16:05
Google's Wave Doodle
@keyframes wave
{
0% {background-position: 0px 0px}
100% {background-position: -388px 0px}
}
@-moz-keyframes wave /* Firefox */
{
0% {background-position: 0px 0px}
100% {background-position: -388px 0px}
@eduardochiaro
eduardochiaro / gist:1789380
Created February 10, 2012 12:34
Activate new Google bar
document.cookie="PREF=ID=03fd476a699d6487:U=88e8716486ff1e5d:FF=0:LD=en:CR=2:TM=1322688084:LM=1322688085:S=McEsyvcXKMiVfGds; path=/; domain=.google.com";window.location.reload();
test