Skip to content

Instantly share code, notes, and snippets.

View karolisg's full-sized avatar

Karolis Gudiškis karolisg

  • Dozer Data
  • Vilnius, Lithuania
  • 17:30 (UTC +02:00)
View GitHub Profile
### Keybase proof
I hereby claim:
* I am karolisg on github.
* I am karolisg (https://keybase.io/karolisg) on keybase.
* I have a public key whose fingerprint is 8229 2FD2 A0FE 1185 9F7C 824B CA37 B482 C60E 2422
To claim this, I am signing this object:
magnet:?xt=urn:btih:099a12cc77fb1198323a21d3a340cca79ffd9fc0&dn=Game%20Of%20Thrones%20Season%201%20to%206%20Eng%20Subs%20Mp4%201080p&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Fzer0day.ch%3A1337&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Fexodus.desync.com%3A6969
"Master_User_Id": parseInt(boostUser.masterUserId),
"First_Name": boostUser.givenName,
"Last_Name": boostUser.surname,
"Name": boostUser.surname,
"Phone_Number_1": boostUser.masterUser.phone,
"Email": boostUser.masterUser.email,
"Street": (boostUser.address1 + ' ' + (boostUser.address2 || '')).trim(),
"City": boostUser.city || '',
"State": boostUser.state || '',
"Zip_Code": boostUser.postalCode || '',
@karolisg
karolisg / invoice_url.php
Last active January 30, 2017 13:16
Method to generate public url for vanta.lt invoice
<?php
/**
* Get url for invoice view
*
* @param $localId Invoice unique id
* @param $companyId Company id
* @param $hash
* @param $iv
*
@karolisg
karolisg / gist:a0f602742e129cb21d3db0cfb4ec589c
Created August 3, 2016 12:02
Attach prefix and suffix to each row
sed -e 's/$/\');/' -i filename
sed -e 's/^/INSERT INTO `parcels`.`barcodes` (`courier_slug`, `company_id`, `identifier`) VALUES ("lp", "183", "/' $file
TypeError: Cannot read property 'map' of undefined
at HTMLUnknownElement.<anonymous> (http://rk.dev/bower_components/ngmap/build/scripts/ng-map.js:718:31)
at HTMLUnknownElement.p.event.dispatch (http://rk.dev/bootstrap/js/jquery.js:2:37941)
at HTMLUnknownElement.p.event.add.g.handle.h (http://rk.dev/bootstrap/js/jquery.js:2:33907)
at Object.p.event.trigger (http://rk.dev/bootstrap/js/jquery.js:2:36583)
at p.fn.extend.triggerHandler (http://rk.dev/bootstrap/js/jquery.js:2:44381)
at removePatch [as remove] (http://rk.dev/javascripts/angular.js:2117:21)
at Object.$AnimateProvider.$get.leave (http://rk.dev/javascripts/angular.js:3983:17)
at http://rk.dev/javascripts/angular-animate.js:449:47
at fireDOMOperation (http://rk.dev/javascripts/angular-animate.js:851:33)
@karolisg
karolisg / fragmentas.xml
Last active August 29, 2015 14:08
Protingas sodas kodo fragmtenas is catalogue.xml
<?xml version="1.0" encoding="UTF-8"?>
<item>
<id>5676</id>
<navid>9789955751212</navid>
<Sapid>000000000002123155</Sapid>
<Atsargu_reg_grupes_kodas />
<Kategorijos_kodas>1W</Kategorijos_kodas>
<Prekes_grupes_kodas />
<BIC_kodas>WMB</BIC_kodas>
<Tiksline_grupe>XII kl. (nuo 18 m.)</Tiksline_grupe>
$('#myTab a').click(function (e) {
e.preventDefault();
$(this).tab('show');
});
// store the currently selected tab in the hash value
$("ul.nav-tabs > li > a").on("shown.bs.tab", function (e) {
var id = $(e.target).attr("href").substr(1);
window.location.hash = id;
});
var values = {name: 'misko', gender: 'male'};
var log = [];
angular.forEach(values, function(value, key){
this.push(key + ': ' + value); }, log);
expect(log).toEqual(['name: misko', 'gender: male']);
<ul>
<li ng-repeat="detail in details | filter:{shortDescription: '!!'}">
<p>{{detail.shortDescription}}</p>
</li>
</ul>