Skip to content

Instantly share code, notes, and snippets.

View patrykgruszka's full-sized avatar

Patryk Gruszka patrykgruszka

  • Comarch
  • Cracow
View GitHub Profile
@patrykgruszka
patrykgruszka / weather-bmp280.ino
Created April 13, 2020 09:53
Arduino weather station BMP280 sensor
#include <LiquidCrystal.h>
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_BMP280.h>
Adafruit_BMP280 bmp; // I2C
// VCC -> 3.3V
// GND -> GND
// SCL -> A5
// SDA -> A4
.flow-offset-1 > * + * {
margin-top: 40px; }
@media (min-width: 480px) {
html:not(.lt-ie10) .flow-offset-1 > .col-xs-1:nth-of-type(n), html:not(.lt-ie10) .flow-offset-1 > .col-xs-2:nth-of-type(n), html:not(.lt-ie10) .flow-offset-1 > .col-xs-3:nth-of-type(n), html:not(.lt-ie10) .flow-offset-1 > .col-xs-4:nth-of-type(n), html:not(.lt-ie10) .flow-offset-1 > .col-xs-5:nth-of-type(n), html:not(.lt-ie10) .flow-offset-1 > .col-xs-6:nth-of-type(n), html:not(.lt-ie10) .flow-offset-1 > .col-xs-7:nth-of-type(n), html:not(.lt-ie10) .flow-offset-1 > .col-xs-8:nth-of-type(n), html:not(.lt-ie10) .flow-offset-1 > .col-xs-9:nth-of-type(n), html:not(.lt-ie10) .flow-offset-1 > .col-xs-10:nth-of-type(n), html:not(.lt-ie10) .flow-offset-1 > .col-xs-11:nth-of-type(n), html:not(.lt-ie10) .flow-offset-1 > .col-xs-12:nth-of-type(n) {
margin-top: 0; } }
@media (min-width: 480px) {
html:not(.lt-ie10) .flow-offset-1 > .col-xs-1:nth-of-type(n + 13), html:not(.lt-ie10) .flow-offset-1 > .col-xs-2:nth-of-type(n + 7), html:not(.l
@patrykgruszka
patrykgruszka / bootstra-carousel-unstyle.less
Created September 8, 2017 11:13
Bootstrap v3 Carousel unstyle
@patrykgruszka
patrykgruszka / bootstrap-carousel-animations.less
Created September 8, 2017 10:37
Bootstrap v3 carousel animations
@patrykgruszka
patrykgruszka / google-maps.js
Last active August 24, 2017 11:53
Google Maps Initializer for websites
(function($, _, window, document) {
var API_URL = 'https://maps.googleapis.com/maps/api/js';
var DEFAULT_INFO_WINDOW_TEMPLATE = '<div class="info-window"><h6><%= title %></h6><p class="mb-none"><%= description %></p></div>';
var GoogleMap = function(data) {
this.$el = $(data.el);
this.markers = [];
this.infoWindowTemplate = _.template(data.infoWindowTemplate || DEFAULT_INFO_WINDOW_TEMPLATE);
this.infoWindow = false;
this.options = GoogleMap.defaults();
@patrykgruszka
patrykgruszka / responsive-background.scss
Created May 5, 2017 20:43
Scss mixin for responsive backgrounds (Bootstrap 3)
@mixin responsive-background($img: 'img', $ext: 'jpg') {
background-image: url("#{$img}-xs.#{$ext}");
@media(min-width: $screen-sm-min) {
background-image: url("#{$img}-sm.#{$ext}");
}
@media(min-width: $screen-md-min) {
background-image: url("#{$img}-md.#{$ext}");
}
@media(min-width: $screen-lg-min) {
background-image: url("#{$img}-lg.#{$ext}");
@patrykgruszka
patrykgruszka / mousewheel-icon.scss
Last active August 22, 2016 12:22
HTML / SCSS Mouse wheel animation icon - https://jsfiddle.net/pgruszka/1ndzyhst/
.mousewheel-icon {
display: inline-block;
height: 38px;
width: 22px;
z-index: 10;
border: 1px solid #333;
border-radius: 16px;
.wheel {
position: relative;
var el = $('#map');
var map;
function enableScrollingWithMouseWheel() {
map.setOptions({
scrollwheel: true
});
}
function disableScrollingWithMouseWheel() {
@patrykgruszka
patrykgruszka / carousel-template
Last active August 29, 2015 14:05
Wordpress widget: Bootstrap carousel
@patrykgruszka
patrykgruszka / chosen-bootstrap-theme.less
Last active December 15, 2015 13:30 — forked from koenpunt/chosen-bootstrap.css
Bootstrap 3 theme for chosen - less
select.form-control + .chosen-container {
&.chosen-container-single .chosen-single {
.form-control();
vertical-align: middle;
div {
top: 50%;
margin-top: -12px;
color: #000;
}
abbr {