Skip to content

Instantly share code, notes, and snippets.

View dariuszparys's full-sized avatar

Dariusz Parys dariuszparys

View GitHub Profile
@dariuszparys
dariuszparys / home.js
Created November 9, 2015 13:53
Office365 TaskPane Demo
/// <reference path="../App.js" />
// global app
(function () {
'use strict';
// The initialize function must be run each time a new page is loaded
Office.initialize = function (reason) {
$(document).ready(function () {
app.initialize();
@dariuszparys
dariuszparys / home.html
Created November 9, 2015 13:52
Office365 TaskPane Demo
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<title>TaskPaneTest</title>
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.1.min.js" type="text/javascript"></script>
<link href="../../Content/Office.css" rel="stylesheet" type="text/css" />
<script src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js" type="text/javascript"></script>
@dariuszparys
dariuszparys / gist:94d3713c80f922ff0ec3
Created May 29, 2015 05:54
Windows 10 Hosted Web App package.appxmanifest Beispiel
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
IgnorableNamespaces="uap mp">
<Identity
Name="75e8f2a8-417e-4cc4-80f7-911b76c90cad"
Version="1.0.0.0"
/// <reference path="phaser.min.js" />
//var phaserGame = new Phaser.Game(800, 600, Phaser.CANVAS, "demo", { preload: preload, create: create });
//function preload() {
//}
//function create() {
// var text = phaserGame.add.text(200, 200, "Hallo, ich bin Phaser", { font: "30px Arial", fill: "#ff00ff" });
// text.anchor.setTo(0.5, 0.5);
@dariuszparys
dariuszparys / index.cshtml
Created October 15, 2013 08:21
Demo from Visual Studio Evolution 2013 Talk on ASP.NET MVC with jQuery Mobile View implementation of the controller action index
@model IEnumerable<WebApplication8.Models.Session>
<div data-role="page" id="seite1">
<div data-role="header">
<h1>VS Evolution Demo</h1>
</div>
<div data-role="content">
<div class="ui-grid-b ui-responsive">
@foreach (var item in Model)
@dariuszparys
dariuszparys / HomeController.cs
Created October 15, 2013 08:18
Demo Snippet from Visual Studio Evolution 2013 Talk jQuery Mobile with ASP.NET MVC Controller Action to retrieve JSON Data and feed the view with it
public async Task<ActionResult> Index()
{
HttpClient client = new HttpClient();
var result = await client.GetAsync("http://vsevolution.azurewebsites.net/api/agenda/getsessions");
// In demos I give a fuck about error handling
result.EnsureSuccessStatusCode();
var response = await result.Content.ReadAsAsync<Session[]>();
return View(response);
@dariuszparys
dariuszparys / gist:5205712
Created March 20, 2013 15:40
Meme Generator
var MemeGenerator;
(function (MemeGenerator) {
var _canvasElement;
var _canvas;
var _image;
var _x;
var _y;
var _text;
var _width = 640;
var _height = 480;
@dariuszparys
dariuszparys / gist:1729408
Created February 3, 2012 09:48
HTML5 Video Preview Drawing
<!DOCTYPE html>
<html>
<head>
<title>HTML5 Video Demo</title>
<script type="text/javascript">
var MAX_FRAMES = 9;
var PREVIEW_FACTOR = 6;
var currentFrame = 1;
document.addEventListener("DOMContentLoaded", createVideoPreview );
@dariuszparys
dariuszparys / gist:843544
Created February 25, 2011 08:56
HTML5 Geolocation WebMatrix Helper
@helper ShowPosition(string outputElementId, string triggerElementId)
{
<script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.5.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready( function() {
$("#@triggerElementId").click(function() {
if (navigator.geolocation)
{
navigator.geolocation.watchPosition(
@dariuszparys
dariuszparys / Html5Video.cshtml
Created January 10, 2011 08:54
WebMatrix HTML5 Video Tag Helper
@functions {
private static bool IsParam(string parameter)
{
if( !string.IsNullOrEmpty( parameter ) )
{
return true;
}
else
{