Skip to content

Instantly share code, notes, and snippets.

View pirxpilot's full-sized avatar

Damian Krzeminski pirxpilot

View GitHub Profile
@pirxpilot
pirxpilot / exception-in-on-resolved.js
Created January 26, 2017 18:48
handling exceptions thrown in onResolved
function p() {
return new Promise(function(resolve) {
setTimeout(() => resolve(5), 200);
});
}
var x = 0;
function throwSomething() {
console.log('Throwing...', ++x);
@pirxpilot
pirxpilot / postcss --help
Created April 22, 2015 23:27
testing wrapping in yargs
Usage: bin/postcss -use|-p plugin [--config|-c config.json] --output|-o output.
css input.css
Options:
-c, --config JSON file with plugin configuration
-u, --use postcss plugin name (can be used multiple times) [required]
-o, --output Output file
-d, --dir Output directory
--safe Enable postcss safe mode. [boolean]
-v, --version Show version number

Keybase proof

I hereby claim:

  • I am pirxpilot on github.
  • I am pirxpilot (https://keybase.io/pirxpilot) on keybase.
  • I have a public key whose fingerprint is 0432 7E0B 81D5 67FE 386F B13A 67C5 2DF5 06E4 ADD7

To claim this, I am signing this object:

@pirxpilot
pirxpilot / Liftie-widgets.markdown
Last active December 30, 2015 10:19
Liftie widgets

Liftie widgets

You can easily embed liftie widget on your page.

All you need is resort ID. The easiest way to get it is to find your resort on liftie and click on its name, which should take you to the details page. The URL in the window should look like this: http://liftie.info/resort/{resort-id} - the last part of the path is what you need.

A Pen by pirxpilot on CodePen.

License.

@pirxpilot
pirxpilot / plan-with-furkot.html
Created September 15, 2013 14:56
If you have a website promoting a restaurant, a hotel, a roadside attraction or any other type of the business or point of interest that people would visit on a trip you can add a Plan with Furkot button to allow visitors to your website mark it as a stop in their Furkot trips.
<form action="https://trips.furkot.com/trip" method="POST">
<input type="hidden" name="stop[name]" value="Okemo Mountain">
<input type="hidden" name="stop[address]" value="77 Okemo Ridge Road, Ludlow, VT 05149">
<input type="hidden" name="stop[coordinates][lat]" value="43.4046">
<input type="hidden" name="stop[coordinates][lon]" value="-72.7442">
<input type="hidden" name="stop[url]" value="http://www.okemo.com">
<input type="hidden" name="stop[notes]" value="Family Ski and Snowboard Resort in Ludlow, VT">
<input type="submit" value="Visit Okemo Resort on your trip">
</form>
@pirxpilot
pirxpilot / widget.html
Created September 15, 2013 14:19
If you have planned a trip that you want to feature on your website or have an article, a post or a page that would be enhanced by one of Furkot's public trips you can add a tripshot widget to your website.
<iframe
width="500"
height="400"
src="https://trips.furkot.com/widget/ts/V2f7Cd">
</iframe>
@pirxpilot
pirxpilot / appstrio.js
Last active December 22, 2015 11:18
appstrio leaderboard snippets without jQuery
// before - with jQuery
$(document).ready(function(){
$('.ad').click(function(e){
e.stopPropagation();
e.preventDefault();
var url, chromeId, isDummy;
url = $(this).attr('href');
chromeId = $(this).data('chromeid');
@pirxpilot
pirxpilot / preview.png
Last active December 14, 2015 02:08
component code42day/clock preview
preview.png
@pirxpilot
pirxpilot / test-png.bash
Created January 30, 2013 06:31
Check if PNG file
#!/bin/bash
if test -e $FILE -a $(file -b --mime-type $FILE) = "image/png"; then
echo 'PNG file'
fi
all:
@echo SRCDIR $(abspath $(dir $(realpath Makefile))/..)
@echo CURDIR $(abspath $(CURDIR)/..)
@echo PWD $(abspath $(PWD)/..)