Skip to content

Instantly share code, notes, and snippets.

View carolina-vallejo's full-sized avatar

Carolina Vallejo carolina-vallejo

  • ITONICS, GmbH
  • Berlin
View GitHub Profile
@carolina-vallejo
carolina-vallejo / grid-sytem.scss
Last active September 27, 2017 17:11
grid system columns subcolumns mixin sass
/*--GRID--*/
@mixin columns-blocks($theGutter, $guttername) {
.blocks-#{$guttername} {
margin-right: 0;
margin-left: 0;
@include responsive('min', $w-mobile-s) {
margin-right: toEm($theGutter * -1);
margin-left: toEm($theGutter * -1);
}
@carolina-vallejo
carolina-vallejo / flip-cards.html
Last active October 4, 2017 13:57
flip cards in css onclick
<div class="flip-container" onclick="this.classList.toggle('hover');">
<div class="flipper">
<div class="inner-card">
<div class="front">
aa
</div>
<div class="back">
bb
</div>
</div>
@carolina-vallejo
carolina-vallejo / request-animation-frame.js
Last active November 5, 2017 11:07
request frame animation frame requestAnimationFrame setinterval animation loop
//--------ANIMATION
var requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
var cancelAnimationFrame = window.cancelAnimationFrame || window.mozCancelAnimationFrame;
var fps, fpsInterval, startTime, now, then, elapsed, time = botCfg.speed;
var animation;
startAnimating(1);
console.log('<br>Computed style width as pixels: ');
console.log(node.style('width'));
console.log('<br>Computed style width as a number: ');
console.log(parseFloat(node.style('width')));
console.log('<br>As a percent: ');
console.log(node.node().style.width);
console.log('<br>Actual width as number: ');
console.log(node.node().offsetWidth);
@carolina-vallejo
carolina-vallejo / exisiting-folder.txt
Last active December 28, 2017 19:20
#git git existing folder
cd existing_folder
git init
git remote add origin [email protected]:radiodraws/react-gist-app.git
git add .
git commit -m "Initial commit"
git push -u origin master
@carolina-vallejo
carolina-vallejo / close-icon-font.html
Last active December 10, 2017 12:58
close icon font use with @charset UTF-8 in css
<a href="#" class="close-btn">×</a>
@carolina-vallejo
carolina-vallejo / random.js
Created September 18, 2017 18:33
random function javascsript
function getRnd(max, min) {
return Math.random() * (max - min) + min;
}
@carolina-vallejo
carolina-vallejo / shuffle-array.js
Created September 21, 2017 08:52
shuffle array javascript
function shuffle(array) {
var currentIndex = array.length,
temporaryValue, randomIndex;
// While there remain elements to shuffle...
while (0 !== currentIndex) {
// Pick a remaining element...
randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex -= 1;
@carolina-vallejo
carolina-vallejo / disable-interaction-leaflet.js
Created September 24, 2017 12:48
disable interaction leaflet
leafletMap.dragging.disable();
leafletMap.touchZoom.disable();
leafletMap.doubleClickZoom.disable();
leafletMap.scrollWheelZoom.disable();
leafletMap.boxZoom.disable();
leafletMap.keyboard.disable();
if (leafletMap.tap) leafletMap.tap.disable();
document.getElementById('mapid').style.cursor = 'default';
@carolina-vallejo
carolina-vallejo / jump-to-slide.js
Created September 25, 2017 14:30
jump to slide owl carousel
$owlHistory.trigger('to.owl.carousel', [0,100]);