This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Created: 2010/12/05 | |
// Updated: 2018/09/12 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it) | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// libsass (v3.5.4) | |
// ---- | |
/// | |
/// String functions by Pascal Duez | |
/// @link https://gist.github.com/pascalduez/10011785 | |
/// | |
@function contain($list, $value) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @desc gets the closes number in a range of numbers | |
* @param {Array} list | |
* @param {Number} goal | |
* @author a mix of stackoverflowers | |
*/ | |
const closestInRange = (list, goal) => ( | |
list.reduce((prev, curr) => ( | |
Math.abs(curr - goal) < Math.abs(prev - goal) ? curr : prev | |
)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ACCESS_TOKEN = "token"; | |
const FILE_ID = "fileId"; | |
const NODE_ID = "Check the url for something like => 3%3A2"; | |
const container = document.getElementById("figma-container") | |
function apiRequest(url) { | |
return fetch(url, { | |
method: 'GET', | |
headers: { "x-figma-token": ACCESS_TOKEN } | |
}).then(function(response) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
lg = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit | |
fixup = "!f() { TARGET=$(git rev-parse "$1"); git commit --fixup=$TARGET ${@:2} && EDITOR=true git rebase -i --autostash --autosquash $TARGET^; }; f" | |
[log] | |
abbrevCommit = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<flyout v-cloak> | |
<div slot-scope="props"> | |
<button | |
v-on:click="props.toggle()" | |
v-bind:class="'border-2 p-1 ' + (props.isActive ? 'bg-green': 'bg-red')" | |
data-reference | |
>…</button> | |
<div | |
v-show="props.isActive" | |
class="list-reset bg-white border p-4 shadow z-10" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[data-layout]{ | |
position: relative; | |
display: flex; | |
} | |
//contains keyowords | |
[data-layout*="vertical"] { flex-direction: column; } | |
[data-layout*="wrap"] { flex-wrap: wrap; } | |
[data-layout*="between"] { justify-content: space-between; } |