Skip to content

Instantly share code, notes, and snippets.

View urish's full-sized avatar

Uri Shaked urish

View GitHub Profile
@urish
urish / designer.html
Created June 30, 2014 00:17
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">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@urish
urish / designer.html
Created June 30, 2014 00:17
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">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@urish
urish / designer.html
Created July 16, 2014 06:47
designer
<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="../smoothie-chart/smoothie-chart.html">
<link rel="import" href="../chart-js/chart-js.html">
<link rel="import" href="../speech-mic/speech-mic.html">
<link rel="import" href="../yt-video/yt-search-video.html">
@urish
urish / app.js
Created March 10, 2012 02:55
Titanium Zero Latency Sound with Multi Touch
/**
* Example application for combining TiMultiTouch module with Zero Latency Sound module.
*
* # https://marketplace.appcelerator.com/apps/860 TiMultiTouch
* # https://marketplace.appcelerator.com/apps/891 Zero Latency Sound
*
* Created for Jose R. Castello
*/
Titanium.UI.setBackgroundColor('#000');
@urish
urish / ng2-hello-world.md
Last active November 22, 2015 00:33
AngularJS 2.0 Hello World How To
  1. Clone the AngularJS 2.0 source tree:

    git clone https://github.com/angular/angular

  2. inside the project directory, run npm install

  3. inside gulpfile.js, replace the 'build' task (near the end of the file) with the following one:

    gulp.task('build', ['jsRuntime/build', 'modules/build.dev.js']);

@urish
urish / gist:4958044
Last active December 13, 2015 18:49
Small Valentine's Gift for GDG leads worldwide :-)
/* Copyright (C) 2013, Uri Shaked, GDG Tel-Aviv Lead. */
var jq = document.createElement("script");
jq.setAttribute("src", "https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js");
jq.setAttribute("type", "text/javascript");
jq.onload = function () {
$ = jQuery;
function e(e, t) {
return e + Math.random() * (t - e)
}
function t(t) {
@urish
urish / mortgage.py
Created May 25, 2013 00:01
Mortgage calculation related functions
def spitzer(k,r,p):
return k-p*(r/12.0)
def months(k,r,p):
total = 0
while k > 0:
k -= spitzer(k,r,p)
total += 1
return total
@urish
urish / directive.js
Created July 7, 2013 14:18
Stylesheet Directive for Angular.js
'use strict';
angular.module('myApp')
.directive('styleSheet', function () {
return {
restrict: 'EA',
template: '<style type="text/css" />',
transclude: true,
replace: true,
@urish
urish / wireless-power.ino
Created January 2, 2016 16:11
Simple Arduino Wireless Power
int led = 13;
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
digitalWrite(led, HIGH);
delayMicroseconds(1);
digitalWrite(led, LOW);
@urish
urish / motorcoil.ino
Created January 6, 2016 10:06
motorcoil
const int phase1pin = 2;
const int phase2pin = 4;
const int phase3pin = 3;
float holdTime = 50000; // microsecs
const unsigned long minHoldTime = 10000;
unsigned long p1start,
p1end,
p2start,
p2end,