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
/* | |
Visual Code: Hide paths for open editors | |
C:\Users\%username%\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\workbench.desktop.main.css | |
Restart VSCode, then the path will hidden, | |
VSCode will tell you something is wrong, click the gear icon set don't alert out again! | |
*/ | |
/* Hide file path */ |
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 | |
// specify your css-files and their order here | |
$cssFiles = array( | |
'normalize.css', 'style.css', 'print.css', 'colorbox.css' | |
); | |
// the file to write the compressed css to | |
$minFileName = 'minified.css'; | |
// thats all, just call this file in your browser and it will | |
// build you a minimized css-file. then just link to this single |
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
// Based on https://www.sitepoint.com/community/t/reorganizing-an-array-odd-entries-as-key-even-entries-as-value/95548/2 | |
function array_pair($items) | |
{ | |
$results = array(); | |
foreach (array_chunk($items, 2) as $pair) { | |
list($key, $value) = $pair+[null,null]; // fix list() issue | |
$results[$key] = $value; | |
} |
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
/* =============================================== | |
Similiar to uk-width of UIkit grid | |
================================================= */ | |
@prefix: uk-width; | |
@grid: 10; | |
@padding: 25px; | |
[class*='@{prefix}-'] { | |
-moz-box-sizing: border-box; |
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
jQuery(function($) { | |
$('form[data-async]').on('submit', function(e) { | |
var $form = $(this); | |
var $target = $($form.attr('data-target')); | |
$.ajax({ | |
type: $form.attr('method'), | |
url: $form.attr('action'), | |
data: $form.serialize(), |