This file contains hidden or 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
-- AppleScript -- | |
-- This example is meant as a simple starting point to show how to get the information in the simplest available way. | |
-- Keep in mind that when asking for a `return` after another, only the first one will be output. | |
-- This method is as good as its JXA counterpart. | |
-- Google Chrome | |
tell application "Google Chrome" to return title of active tab of front window | |
tell application "Google Chrome" to return URL of active tab of front window | |
-- Google Chrome Canary |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Author</key> | |
<string></string> | |
<key>AuthorURL</key> | |
<string></string> | |
<key>CanDragToMacroGroup</key> | |
<true/> |
This file contains hidden or 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 jsonFiles = ['*.theme.json']; | |
// Setup the linting | |
function lintJson() { | |
return gulp.src(jsonFiles) | |
.pipe(jsonlint()) | |
.pipe(jsonlint.reporter()); | |
} | |
// Add a validate task that will fail on lint error |
This file contains hidden or 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 lintJson() { | |
return gulp.src('*.theme.json') | |
.pipe(jsonlint()) | |
.pipe(jsonlint.reporter()); | |
} | |
gulp.task('validate:json', 'Test JSON', function() { | |
return lintJson().pipe(jsonlint.failAfterError()); | |
}); | |
tasks.validate.push('validate:json'); |
This file contains hidden or 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
/// List to String (like JS's `join`) | |
/// Converts Sass list to string using `$glue` separator. | |
/// @param {list} $list | |
/// @param {string} $glue [''] - What join list items with (ex `,`) | |
/// @param {bool} $is-nested [false] | |
/// @return {string} | |
/// @link http://hugogiraudel.com/2013/08/08/advanced-sass-list-functions/ Source | |
@function to-string($list, $glue: '', $is-nested: false) { | |
$result: null; |
This file contains hidden or 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
#!/usr/bin/env node | |
var semver = require('semver'); | |
var requiredVer = require('../package.json').devDependencies['p2-theme-core']; | |
var installedVer = require('p2-theme-core/package.json').version; | |
//console.log('requiredVer', requiredVer); | |
//console.log('installedVer', installedVer); | |
if (! semver.satisfies(installedVer, requiredVer)) { | |
console.log('Installed version of "p2-theme-core" is old; updating...'); | |
var exec = require('child_process').execSync; |
This file contains hidden or 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 colorScheme = 'darkula'; | |
var link = document.createElement('link'); | |
link.setAttribute('rel', 'stylesheet'); | |
link.setAttribute('type', 'text/css'); | |
link.setAttribute('href', '//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.1.0/styles/' + colorScheme + '.min.css'); | |
document.getElementsByTagName('head')[0].appendChild(link); | |
var script = document.createElement('script'); | |
script.setAttribute('type', 'text/javascript'); |
This file contains hidden or 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
<!doctype html> | |
<html class="no-js" lang="en"> | |
<head> | |
<title></title> | |
<meta name="description" content=""> | |
<!-- Mobile viewport optimized: j.mp/bplateviewport --> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> | |
<!-- Bootstrap: Latest compiled and minified CSS --> |
This file contains hidden or 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
<h1>Using <a href="http://emmet.io">Emmet</a></h1> | |
<!-- .template>h1.title+.body>p*3 --> | |
<div class="template"> | |
<h1 class="title"></h1> | |
<div class="body"> | |
<p></p> | |
<p></p> | |
<p></p> | |
</div> |
This file contains hidden or 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
#!/usr/bin/env node | |
var semver = require('semver'); | |
var requiredVer = require('../package.json').devDependencies['p2-theme-core']; | |
var installedVer = require('p2-theme-core/package.json').version; | |
//console.log('requiredVer', requiredVer); | |
//console.log('installedVer', installedVer); | |
if (! semver.satisfies(installedVer, requiredVer)) { | |
console.log('Installed version of "p2-theme-core" is old; updating...'); | |
var exec = require('child_process').execSync; |