Skip to content

Instantly share code, notes, and snippets.

View HelgaZhizhka's full-sized avatar
👁️‍🗨️

Olga Zhyzhka HelgaZhizhka

👁️‍🗨️
View GitHub Profile
@lukaszb
lukaszb / http.js
Last active May 15, 2019 02:49
es6 http client using fetch
import 'whatwg-fetch'
import Auth from './Auth';
import Url from 'url-parse';
const API_URL = process.env.API_URL
const http = {
get: get,
getAuthed: getAuthed,
@moso
moso / app.js
Last active June 12, 2025 07:12
laravel-mix config
// jQuery import
global.jQuery = require('jquery');
var $ = global.jQuery;
window.$ = $;
// Bootstrap 4 depends on Popper.js
// Popper.js import
//import Popper from 'popper.js';
//window.Popper = Popper;
@brenopolanski
brenopolanski / npm-list-globally.md
Created November 1, 2016 19:34
Listing globally installed NPM packages and version
npm list -g --depth=0
@jayllellis
jayllellis / infinite-zoom.css
Last active February 22, 2023 23:45
Infinite slow zoom CSS animation
.infinite-zoom{
-webkit-animation: zoomSlow 60s infinite linear;
-moz-animation: zoomSlow 60s infinite linear;
animation: zoomSlow 60s infinite linear;
}
@-webkit-keyframes zoomSlow {
0% {
-moz-transform: scale(1);
-webkit-transform: scale(1);
@kogakure
kogakure / gist:27b6e02034bae4ed7c70
Last active December 18, 2019 15:00
Pure CSS multiline text with ellipsis
/* http://martinwolf.org/2013/01/29/pure-css-multiline-text-with-ellipsis/ */
$font-size: 26px;
$line-height: 1.4;
$lines-to-show: 3;
h2 {
display: block; /* Fallback for non-webkit */
display: -webkit-box;
max-width: 400px;
@joekukish
joekukish / calc-mixin.styl
Created August 12, 2014 18:48
Stylus `calc()` mixin
// Adds the vendor prefixes for calc.
//
// Usage:
// width: calc('30% - 10px');
// If variables are needed they need to be specified this way.
// width: calc('40% \- %s' % (10px));
calc() {
// vendors to be used by this function
calc-vendors = webkit moz;
@kiennt2
kiennt2 / swiper slider with thumbs carousel
Last active August 17, 2017 21:09
swiper slider with thumbs carousel
@avilaj
avilaj / rems.styl
Last active December 17, 2015 23:49
Stylus rems converter with fallback I haven't tested it very much. License MIT
// License MIT
// Author: Jorge Avila <[email protected]>
// Example:
// body
// -rems('margin', 10 20 30 40)
basefont = 16px
-rems(property, sizes)
rems = new array()
pixs = new array()
@davidtheclark
davidtheclark / isElementInViewport.js
Created May 4, 2013 02:00
JavaScript: Is element in viewport?
/*
No jQuery necessary.
Thanks to Dan's StackOverflow answer for this:
http://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport
*/
function isElementInViewport(el) {
var rect = el.getBoundingClientRect();
return (
rect.top >= 0 &&
@hawkz
hawkz / rem-fallback.less
Last active December 14, 2015 08:08 — forked from drublic/rem-fallback.less
Quick modification for multiple values - not the most concise, but this is being compiled pre-upload...
@main-font-size: 16px;
.x-rem (@property, @value) {
// This is a workaround, inspired by https://github.com/borodean/less-properties
@px-fallback: @value * @main-font-size;
-: ~`(function () { return ';@{property}: @{px-fallback}'; }())`;
-: ~`(function () { return ';@{property}: @{value}rem'; }())`;
}
.x-rem (@property, @v1, @v2) {
@px-v1: @v1 * @main-font-size;