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 child_process = require('child_process'); | |
const runOnCurrentSim = () => { | |
try { | |
const simulators = JSON.parse( | |
child_process.execFileSync( | |
'xcrun', | |
['simctl', 'list', '--json', 'devices'], | |
{encoding: 'utf8'}, | |
), |
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
Locale Identifier | Description | |
---|---|---|
af | Afrikaans | |
af-NA | Afrikaans (Namibia) | |
af-ZA | Afrikaans (South Africa) | |
agq | Aghem | |
agq-CM | Aghem (Cameroon) | |
ak | Akan | |
ak-GH | Akan (Ghana) | |
am | Amharic | |
am-ET | Amharic (Ethiopia) |
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.2.5) | |
// ---- | |
@mixin headings($from: 1, $to: 6) { | |
%headings-#{$from}-#{$to} { | |
@content | |
} | |
@if $from >= 1 and $to <= 6 { |
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
var gulp = require('gulp'); | |
var uglify = require('gulp-uglify'); | |
var concat = require('gulp-concat'); | |
var bower = require('main-bower-files'); | |
gulp.task('bower', function () { | |
return gulp.src(bower()) | |
.pipe(concat('vendor.js')) | |
.pipe(uglify()) | |
.pipe(gulp.dest('/build/scripts')); |
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
var noRepeat = function () { | |
return function (css) { | |
css.eachDecl('background-repeat', function (decl) { | |
if (decl.value.indexOf('none') !== -1) { | |
decl.value = 'no-repeat'; | |
} | |
}); | |
}; | |
}; |
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
{ | |
onStick: function () { | |
document.querySelector('.img-elem').src = '/path/to/stick-img.png' | |
}, | |
onUnstick: function () { | |
document.querySelector('.img-elem').src = '/path/to/unstick-img.png' | |
}, | |
} |
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
{# Get the IDs of all the sections #} | |
{% set currentSectionId = entry.id %} | |
{% set allSectionIds = craft.entries.section('myStructure').level(1).ids() %} | |
{# Define var before loop #} | |
{% set sectionNumber = '' %} | |
{# Loop through all section IDs and find the one that matches the current #} | |
{% for key, sectionId in allSectionIds if sectionId == currentSectionId %} |
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
<p>Normal</p> | |
<a class="btn btn--primary">Button</a> | |
<a class="btn btn--primary btn--outline">Button</a> | |
<a class="btn btn--secondary">Button</a> | |
<a class="btn btn--secondary btn--outline">Button</a> | |
<a class="btn btn--tertiary">Button</a> | |
<a class="btn btn--tertiary btn--outline">Button</a> |
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
<p>Normal</p> | |
<a class="btn btn--primary">Button</a> | |
<a class="btn btn--primary btn--outline">Button</a> | |
<a class="btn btn--secondary">Button</a> | |
<a class="btn btn--secondary btn--outline">Button</a> | |
<a class="btn btn--tertiary">Button</a> | |
<a class="btn btn--tertiary btn--outline">Button</a> |
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
function extend (target, source) { | |
var a = Object.create(target); | |
Object.keys(source).map(function (prop) { | |
a[prop] = source[prop]; | |
}); | |
return a; | |
}; |
NewerOlder