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
<?php | |
$blade->directive("sortHeader", function (...$args) { | |
$params = explode(",", $args[0]); | |
$output = call_user_func_array("sortHeader", $params); | |
die($output); | |
return "<?php echo $output; ?>"; | |
}); |
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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
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
{ | |
"health": 4, | |
"healthIndicator": "RED", | |
"scopeCanBeAdjusted": true, | |
"id": 60293, | |
"unitCurrency": null, | |
"projectId": 4051, | |
"baseCharge": null, | |
"minimumCharge": null, | |
"parentSequenceId": 7297, |
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
import { escape } from "lodash"; | |
export default function(str, format = true) { | |
try { | |
// ensure that we got valid json here... | |
const obj = JSON.parse(str); | |
if (format) str = JSON.stringify(obj, null, 2); | |
str = _parseObj(obj, str); | |
// dont wrap with the parent tag till we are done... | |
return `<span class="json-markup">${str}</span>`; |
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
{ | |
"window.zoomLevel": 1, | |
"editor.fontFamily": "LigaMonaco, Monaco, 'Courier New', monospace", | |
"editor.fontSize": 13, | |
"editor.lineHeight": 19, | |
"editor.renderLineHighlight": "all", | |
"editor.fontLigatures": true, | |
"atomKeymap.promptV3Features": true, | |
"editor.formatOnPaste": true, | |
"editor.folding": false, |
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
context.commit("setPage", [ | |
{ | |
title: "hello there", | |
created_timestamp: "2018-06-06 22:23:48.324468-07", | |
updated_timestamp: "2018-06-06 22:23:48.324468-07", | |
targets: [{ lang: "en" }], | |
meta: { | |
user_assignment: {}, | |
track: { songId: "sdfsdf", artistNames: [] }, | |
}, |
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
{ | |
"root": true, | |
"parserOptions": { | |
"ecmaVersion": 8 | |
}, | |
"plugins": [ | |
"prettier", | |
"unicorn", | |
"promise", | |
"html" |
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
{ | |
"root": true, | |
"parserOptions": { | |
"ecmaVersion": 8 | |
}, | |
"plugins": [ | |
"prettier", | |
"unicorn", | |
"promise" | |
], |
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
<template lang="pug"> | |
.user-edit(v-if="dataLoaded") | |
//- your data is ready | |
</template> | |
<script> | |
import TethysVue from "@welocalize/tethys-vue"; | |
export default { |
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 test = require("ava"); | |
const sinon = require("sinon"); | |
const SDK = require("@welocalize/pantheon-api-sdk"); | |
const getJwt = sinon.stub(SDK, "getJwt"); | |
test("stubbing a success of getJwt", t => { | |
const payload = { data: "foobar" }; | |
getJwt.returns(Promises.resolve(payload)); | |
}); |
NewerOlder