Skip to content

Instantly share code, notes, and snippets.

View lukashavrlant's full-sized avatar
🐦
It's time to make a tea

Lukáš Havrlant lukashavrlant

🐦
It's time to make a tea
View GitHub Profile
<input type="hidden" id="Countries_0__Text" name="Countries[0].Text" value="Česká republika">
<input type="hidden" id="Countries_0__Value" name="Countries[0].Value" value="CZ">
<input type="hidden" id="Countries_1__Text" name="Countries[1].Text" value="Slovenská republika">
<input type="hidden" id="Countries_1__Value" name="Countries[1].Value" value="SK">
<input type="hidden" id="Countries_2__Text" name="Countries[2].Text" value="Polská republika">
<input type="hidden" id="Countries_2__Value" name="Countries[2].Value" value="PL">
<input type="hidden" id="Countries_3__Text" name="Countries[3].Text" value="Rakouská republika">
<input type="hidden" id="Countries_3__Value" name="Countries[3].Value" value="AT">
<input type="hidden" id="Countries_4__Text" name="Countries[4].Text" value="Spolková republika Německo">
<input type="hidden" id="Countries_4__Value" name="Countries[4].Value" value="DE">
<form>
<p>Cena knihy: <span id="item-price">440</span>,- Kč s DPH</p>
<input type="number" name="item-count" value="1" min="1" step="1"> <!-- selectovat přes name -->
<p>Zboží celkem: <span id="item-count-price"></span>
<br>
<input type="radio" name="delivery-option" value="(+ 99,- Kč) Dobírkou (Česká pošta)" checked>(+ 99,- Kč) Dobírkou (Česká pošta)<br>
<input type="radio" name="delivery-option" value="(+ 0,- Kč) Osobní odběr v Galerii Gottfrei, Krnovská 14/13, Opava">(+ 0,- Kč) Osobní odběr v Galerii Gottfrei, Krnovská 14/13, Opava
<p>Cena celkem: <span id="order-total"></span>,- Kč</p>
</form>
{
"_id" : "fc5cebc8-1335-4517-9a16-7dcec928405f",
"data" : {
"tenantId" : "d36aae14-b7d1-496c-accf-769b596d5652",
"type" : "website",
"state" : "inUse",
"id" : "fc5cebc8-1335-4517-9a16-7dcec928405f",
"name" : "",
"publisherId" : "98fadecf-ae00-48ec-9c91-255d2105fd78",
"labels" : [
{
"_id" : "94dcef68-b29b-48a7-a14c-5a37196519a1",
"data" : {
"type" : "banner",
"state" : "inUse",
"tenantId" : "46789fe1-0a01-46c8-83b1-8f7824a2f0ea",
"id" : "94dcef68-b29b-48a7-a14c-5a37196519a1",
"mediumId" : "8aaf6d1e-47ba-418d-b12f-3f5c306db67e",
"name" : "name",
"format" : [
/* 1 */
{
"_id" : "e9f73773-b7b0-49fe-913a-27a503b7be13",
"lastModificationTime" : ISODate("2018-01-19T13:43:14.547Z"),
"record" : {
"type" : "banner",
"state" : "inUse",
"id" : "e9f73773-b7b0-49fe-913a-27a503b7be13",
"mediumId" : "0bd9dd89-c7e8-4cc3-b9a6-c69a5f8d5797",
"name" : "name",
export class CreatePortfolioActionAdapter implements HttpActionBuilder<PortfolioManagementCommand> {
public constructor(
private entityRepository: EntityRepository<Entity>,
private responseBuilder: HttpResponseDataBuilder
) {
}
public build(request: HttpRequest, security: SecurityDescriptor): Promise<PortfolioManagementCommand> {
const portfolioId = new Uuidv4(request.getBodyData('portfolioId'));
var fastSafeStringify = require('fast-safe-stringify');
var fastJsonStringify = require('fast-json-stringify');
var fastStableStringify = require('fast-stable-stringify');
const object = {
foo: "bar",
number: 12345,
bool: true,
name: "some really long string",
message: "this is really weird"
const continuation = require('continuation-local-storage');
const uuid = require('node-uuid');
const NAMESPACE = 'luha-test';
const namespace = continuation.createNamespace(NAMESPACE);
for (let i = 0; i < 5; i++) {
namespace.run(function () {
const id = uuid.v4();
namespace.set('correlationId', id);
const WindowDatabase = {
getItem: (key) => {
try {
return JSON.parse(window.name)[key];
} catch(err) {
console.error(`Cannot get ${key} from WindowDatabase`);
return null;
}
},
setItem: (key, value) => {
@lukashavrlant
lukashavrlant / obchodni-cesty.js
Last active May 29, 2017 15:03
Travian Obchodní Cesty
javascript: (function () {
var confirmationInterval = null;
var autoSubmitEnabledMsg = "Po kliknutí automaticky potvrdit formulář s obchodní cestou.";
var autoSubmitDisabledMsg = "Po kliknutí nepotvrzovat formulář s obchodní cestou, nutné ruční odeslání.";
var helperId = "tbc-trade-route-helper";
var ids = [
"tbc-lumber", "tbc-clay", "tbc-iron", "tbc-crop", "tbc-villages", "tbc-number-of-trips", "tbc-village-id"
];
var helper = document.getElementById(helperId);
var body = document.getElementsByTagName("body")[0];