Skip to content

Instantly share code, notes, and snippets.

View laander's full-sized avatar

Lasse Boisen Andersen laander

View GitHub Profile
@laander
laander / widget-language-example.htm
Last active May 29, 2018 12:19
Booking.js widget full language localization
<div id="bookingjs"></div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdn.timekit.io/booking-js/v1/booking.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/lang/es.js"></script>
<script>
window.timekitBookingConfig = {
widgetId: '6a6c24ce-41a6-4114-9c15-de9ec3d92630',
fullCalendar: {
locale: 'es'
},
@laander
laander / timekit-ruby-example.rb
Created January 30, 2016 19:46
Example integration with Timekit in Ruby
# Global configs for "admin" user
TK_ADMIN_USER = 'my-email@gmail.com'
TK_ADMIN_TOKEN = '12345ABCD'
# Example usage:
# timekit = Timekit.new(TK_ADMIN_USER, TK_ADMIN_TOKEN)
# tk_user = timekit.create_user(account)
# someInternalUser.update(tk_token: tk_user.token)
class Timekit
@laander
laander / sqren.txt
Created January 26, 2016 21:53
Grats buddy!
\\\ ,
\ `|
) ( .-""-.
| | /_ { '.
| | (/ `\ } )
| | ^/ ^`} {
\ \ \= ( { )
\ \ '-, { {{
\ \_.' ) } )
\.-' ( (
vagrant@precise64:/vagrant/emu$ make
cc -ggdb -Wall -O2 -march=native -fprofile-generate -c -o main.o main.c
main.c: In function 'main':
main.c:116:3: warning: pointer targets in passing argument 1 of 'lcdRender' differ in signedness [-Wpointer-sign]
lcd.h:24:6: note: expected 'uint8_t *' but argument is of type 'char *'
main.c:126:4: warning: implicit declaration of function 'tamaDumpHw' [-Wimplicit-function-declaration]
main.c:127:4: warning: implicit declaration of function 'benevolentAiDump' [-Wimplicit-function-declaration]
main.c:131:4: warning: pointer targets in passing argument 1 of 'lcdDump' differ in signedness [-Wpointer-sign]
lcd.h:25:6: note: expected 'uint8_t *' but argument is of type 'char *'
main.c: In function 'getKey':
@laander
laander / justeat-export.json
Created July 18, 2014 18:42
Test export from JE with array-based lists
[{
"title": "Kundernes favorit",
"items": [{
"id": "33",
"title": "Husets Specialitet",
"description": "Pizza med tomat, ost, kebab, salat og creme fraiche",
"variants": [{
"name": "Alm",
"price": "69,00"
}, {
@laander
laander / esperiaemdrup-menu.json
Last active August 29, 2015 14:04
Esperia Emdrup export from JE
{"1":{"title":"Kundernes favorit","items":{"0":{"id":"33","title":"Husets Specialitet","description":"Pizza med tomat, ost, kebab, salat og creme fraiche","variants":{"0":{"name":"Alm","price":"69,00"},"1":{"name":"Deep pan","price":"87,00"},"2":{"name":"Fam","price":"150,00"}}}}},"2":{"title":"Drikke","items":{"0":{"id":"271","title":"1,5 L sodavand","description":"Coca-Cola / Coca-Cola Zero\nFanta / Faxe Kondi","price":"34,00"},"1":{"id":"272","title":"0,5 L sodavand","description":"Coca-Cola / Fanta\nFaxe Kondi","price":"23,00"},"2":{"id":"273","title":"0,5 L Cocio","description":"","price":"23,00"},"3":{"id":"274","title":"Øl","description":"Carlsberg / Tuborg","price":"15,00"},"4":{"id":"275","title":"1 flaske vin","description":"Rødvin / Hvidvin","price":"75,00"},"5":{"id":"276","title":"3 flasker vin","description":"Rødvin / Hvidvin","price":"189,00"}}},"3":{"title":"Menuer","items":{"0":{"id":"251","title":"Hjemmelavet Burger Menu","description":"Med kartoffelbåde eller pommes frites, salatmayonnaise
@laander
laander / menu-test.json
Created July 17, 2014 12:15
Test result of Just-Eat menu export
[{"title":"CocaCola Drikkevarer","items":[{"title":"Coca-Cola","variants":[{"name":"0,50 L","price":"20,00"},{"name":"1,50 L","price":"34,00"},{"name":"Dåse","price":"12,00"}]},{"title":"Fanta","variants":[{"name":"0,50 L","price":"20,00"},{"name":"1,50 L","price":"34,00"},{"name":"Dåse","price":"12,00"}]},{"title":"Faxe kondi","variants":[{"name":"0,50 L","price":"20,00"},{"name":"1,50 L","price":"34,00"},{"name":"Dåse","price":"12,00"}]},{"title":"Coca-Cola Zero","variants":[{"name":"0,50 L","price":"20,00"},{"name":"1,50 L","price":"34,00"},{"name":"Dåse","price":"12,00"}]}]},{"title":null,"items":[{"id":null,"title":null,"description":null,"variants":[{"name":null,"price":null}]}]},{"title":"Menuer","items":[{"id":"401.","title":"Menu 1","description":"Hjemmelavet burger med pommes frites, salatmayonnaise og 0,50 L sodavand","price":"DKK80,00"},{"id":"402.","title":"Menu 2","description":"2 pizzaer + sandwich","price":"DKK139,00"},{"id":"403.","title":"Menu 3","description":"1 big buger med pommes frites
@laander
laander / useref-concat.js
Created July 11, 2014 14:41
Useref Concat problem
!function(t,e,n){"use strict";function r(t){return function(){var e,n=arguments[0],n="["+(t?t+":":"")+n+"] http://errors.angularjs.org/1.2.18/"+(t?t+"/":"")+n;for(e=1;e<arguments.length;e++)n=n+(1==e?"?":"&")+"p"+(e-1)+"="+encodeuricomponent("function"==typeof 1="==t.nodeType&&e?!0:w(t)||or(t)||0===e||"number"==typeof" ,""):"undefined"="=typeof" arguments[e]?"undefined":"string"!=typeof i(t){if(null="=t||k(t))return!1;var" e=t.length;return>0&&e-1 in t}function o(t,e,n){var r;if(t)if(S(t))for(r in t)"prototype"==r||"length"==r||"name"==r||t.hasOwnProperty&&!t.hasOwnProperty(r)||e.call(n,t[r],r);else if(t.forEach&&t.forEach!==o)t.forEach(e,n);else if(i(t))for(r=0;r<t.length;r++)e.call(n,t[r],r);else e,n=[];for(e r="s(t),i=0;i<r.length;i++)e.call(n,t[r[i]],r[i]);return" t,e="ir.length;e;){if(e--,t=ir[e].charCodeAt(0),57==t)return" ir[e]=A ,ir.join("");if(90!=t)return l(t,e){e?t.$$hashkey=e:delete e=t.$$hashKey;return o(arguments,function(e){e!="=t&&o(e,function(e,n){t[n]=e})}),l(t,e),t}function" g(t){return"und
@laander
laander / checkout_wpec.php
Created December 6, 2012 02:22
Checkout logic and templating @ Wordpress E-commerce
<?php
/**
* WPSC Shopping Cart Page
*
* The checkout/shopping cart page with buy form
*/
global $wpsc_cart, $wpdb, $wpsc_checkout, $wpsc_gateway, $wpsc_coupons;
$wpsc_checkout = new wpsc_checkout();
$wpsc_gateway = new wpsc_gateways();
$alt = 0;
@laander
laander / checkout_kobstaden.js
Created December 6, 2012 02:21
Checkout logic and templating @ Købstaden
/**
* Renders the checkout process
*/
APP.checkOutFullView = new Class({
Implements: GritView,
template: new Mooml.Template("", function(o){
div({id: 'main'},
div({'class': 'layout-sidebar'},