Skip to content

Instantly share code, notes, and snippets.

View jurby's full-sized avatar
💭
AI-Native powered🤖

Jaroslav Urbánek jurby

💭
AI-Native powered🤖
View GitHub Profile
public RetailStreamHandler(IDocumentRepository<ShoppingCart> cartRepository)
{
_cartRepository = cartRepository;
Get["/cart"] = x => GetListing();
Post["/cart"] = x => PostNewShoppingCart(Request.Body.FromJson<ShoppingCartForm>());
Get["/cart/{id}"] = x => GetById(x.id);
}
[RequiresAuthentication]
public virtual Response PostNewShippingCart(ShoppingCartForm form)
using System;
using System.Linq.Expressions;
using System.Reflection;
using System.Web.Mvc;
using System.Web.Routing;
namespace MonkeyBusters.Web.Mvc
{
public static class SafeMvcUrls
{
var userGuid = "5895d593-9461-4b8b-8452-95bb82458bd2";
var apiKey = "YOUR_API_KEY";
/**
* Query importio for data.
*
* @param {string} connectorGuid the number we're raising to a power
* @param {object} input the exponent we're raising the base to
* @param {string} userGuid the exponent we're raising the base to
* @param {string} apiKey the exponent we're raising the base to
@jurby
jurby / test.css
Last active August 29, 2015 13:57
body {
background: grey !important;
}
div#ar-main div.newform form#formFerratum {
color: red !important;
background: red !important;
}
define(['angular', 'services'], function (angular) {
'use strict';
return angular.module('myApp.controllers', ['myApp.services'])
.controller('IndexCtrl', ['$scope', 'googleService' function ($scope, googleService) {
$scope.login = function () {
googleService.login().then(function (data) {
// do something with returned data
console.log(data.email);
//Send Google Apps Script data to a Couch DB database
function syncWithDB(data){
var username = ScriptProperties.getProperty('user');
var password = ScriptProperties.getProperty('pass');
var url = 'https://[username].cloudant.com/[dbname]/_bulk_docs';
var params = {
"method" : "post",
"contentType":"application/json",
"validateHttpsCertificates" :false,
"payload" : JSON.stringify(data),
@jurby
jurby / test.js
Created April 25, 2013 21:58
test
console.log('test...');