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
@ECHO OFF | |
SETLOCAL | |
SET "appdir=path\to\webroot" | |
SET "srcdir=.\dist\spa" | |
echo delete files from folders | |
echo ------------------------ | |
FOR /D %%a IN (%srcdir%\*) DO ( | |
echo .\assets\%%~nxa\* | |
RD /S /Q "%appdir%\assets\%%~nxa" | |
) |
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 gulp = require('gulp'); | |
const requireDir = require('require-dir'); | |
// load tasks | |
requireDir('./gulp', { | |
recurse: true, | |
mapValue: function(value) { | |
if (typeof value === 'object') { | |
const keys = Object.keys(value); | |
return keys.map(taskName => { | |
return gulp.task(taskName, value[taskName]) |
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($) { | |
$.getStylesheet = function (href) { | |
var $d = $.Deferred(); | |
var $link = $('<link/>', { | |
rel: 'stylesheet', | |
type: 'text/css', | |
href: href | |
}).appendTo('head'); | |
$d.resolve($link); | |
return $d.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
export function someAction({ commit }) { | |
commit( | |
'notify/setMessage', | |
{ | |
msgType: 'negative', | |
msgText: 'someText' | |
}, | |
{ root: 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
/********************************************************************************************************************************************* | |
* Get data from url | |
**********************************************************************************************************************************************/ | |
function getData(url){ | |
var options = { | |
'contentType' : 'application/json', | |
'headers' : { | |
'Authorization' : '<token>' | |
} | |
}; |
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
private function request($endpoint, $method='GET', $body=false) { | |
$url = "https://example.com$endpoint"; | |
$token = 'API_TOKEN'; | |
$headers = [ | |
"Authorization: Token token=$token", | |
"Content-Type: application/json"; | |
]; | |
if($body!==false){ | |
if($method=='GET'){ |
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
private function parseTimeFromSlug($slug){ | |
$re = '/^(.*)([0-2][0-9])(-)([0-5][0-9])$/m'; | |
$subst = '$2:$4'; | |
$result = preg_replace($re, $subst, $slug); | |
return $result; | |
} |
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
//col and row position of status check | |
const ROW_CHECK = 2 | |
const COL_CHECK = 2 | |
//row and col index to be hide and unhide | |
const ROW_TO_HIDE = 10 | |
const COL_TO_HIDE = 1 | |
//row count to be hide and unhide | |
var ROW_HIDE_COUNT = 11 |
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
$.fn.highlight = function() { | |
$(this).each(function() { | |
var el = $(this); | |
el.before("<div/>") | |
el.prev() | |
.width(el.width()) | |
.height(el.height()) | |
.css({ | |
"position": "absolute", | |
"background-color": "#ffff99", |
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
//to get id from item_12 | |
var id = className.split('_').pop(); //output 12 |
OlderNewer