Skip to content

Instantly share code, notes, and snippets.

View filipveschool's full-sized avatar
🎯
Focusing

Filip filipveschool

🎯
Focusing
View GitHub Profile
@sdnts
sdnts / example.md
Last active January 10, 2023 20:50
Postman pm.sendRequest example

To send a request via the sandbox, you can use pm.sendRequest.

pm.test("Status code is 200", function () {
    pm.sendRequest('https://postman-echo.com/get', function (err, res) {
        pm.expect(err).to.not.be.ok;
        pm.expect(res).to.have.property('code', 200);
        pm.expect(res).to.have.property('status', 'OK');
    });
});
@SmartFinn
SmartFinn / _mixins.scss
Last active January 25, 2017 06:37
SASS Mixins
/// Mixin to prefix several properties at once
/// @author Hugo Giraudel
/// @param {Map} $declarations - Declarations to prefix
/// @param {List} $prefixes (()) - List of prefixes to print
@mixin prefix($declarations, $prefixes: (webkit moz ms o)) {
@each $property, $value in $declarations {
@each $prefix in $prefixes {
#{'-' + $prefix + '-' + $property}: $value;
}
@paulfarino
paulfarino / sass-theme.scss
Created October 21, 2016 22:02
Sass Theming
// Variables
$black : #000000;
$white : #FFFFFF;
$alpha : #FF0000;
$themes: (
blue: (
alpha: blue,
beta: orange
),
@w-radek
w-radek / Function.scss
Last active January 25, 2017 06:34
SASS
@for $i from 1 through 6 {
&:nth-child(#{$i}) {
@include transition(opacity .5s ease (.1s * $i));
}
}
@aleroddepaz
aleroddepaz / persistence.xml
Last active June 6, 2024 21:29
Sample JPA 2.1 persistence units
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
version="2.1">
<!-- Hibernate + H2 -->
<persistence-unit name="standalonePu" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<class>com.acme.MyEntity</class>
<properties>
@mixin clear{
&:before,&:after{
content:' ';
display: table;
}
&:after{
clear: both;
}
}
$one-rem:36;
@adamwathan
adamwathan / belongs-to-many.sublime-snippet
Last active August 3, 2024 16:44
Eloquent Relationship snippets for Sublime Text
<snippet>
<content><![CDATA[
public function ${1:relationship}()
{
return \$this->belongsToMany(${1/^(.+)$/(?1\u$1:)/g}::class, {$2:table});
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>belt</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
@jasonkhanlar
jasonkhanlar / fontawesome.sty
Last active March 18, 2024 06:42 — forked from sway/fontawesome.sty
FontAwesome mapping for XeLaTeX
% FontAwesome (http://fortawesome.github.com/Font-Awesome/) bindings for (Xe)LaTeX
% Author: Honza Ustohal <[email protected]>
% Updated to match FontAwesome v4.5.0 by Jason Khanlar <[email protected]>
%
% Translation of FontAwesome's private range characters into XeTeX symbols. All icons are camel-cased and prefixed with 'fa', i.e. what was .icon-align-center the CSS version of FontAwesome becomes \faAlignCenter
% This might be reworked into a full blown package in the near future
%
% Prerequisite:
% XeLaTeX, FontAwesome installed as a system font accessible by XeLaTeX
%
.social {
li {
display: inline-block;
line-height: 40px;
&:first-child {
margin: 0 10px 0 0;
}
}
@pedroseac
pedroseac / mixins.scss
Last active January 25, 2017 09:07
SASS mixins
//Material shadows
@mixin shadow($level: 1, $custom: 0 0 0 0 white){
@if $level == 0 {
box-shadow: none;
} @else if $level == 1 {
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24), $custom;
} @else if $level == 2 {
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23), $custom;
} @else if $level == 3 {
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23), $custom;