Skip to content

Instantly share code, notes, and snippets.

View qaharmdz's full-sized avatar

Mudzakkir qaharmdz

  • Java, Indonesia
View GitHub Profile
@qaharmdz
qaharmdz / workbench.desktop.main.css
Last active March 23, 2024 16:28
VS Code: custom style - hide file path at Open Editors sidebar
/*
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 */
@qaharmdz
qaharmdz / minify.php
Created June 15, 2019 02:29
A small PHP-Script for minifying CSS
<?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
@qaharmdz
qaharmdz / gist:48b573967da8e5441765111401ef205b
Created July 6, 2017 09:17
PHP array pair: odd as key, even as value
// 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;
}
/* ===============================================
Similiar to uk-width of UIkit grid
================================================= */
@prefix: uk-width;
@grid: 10;
@padding: 25px;
[class*='@{prefix}-'] {
-moz-box-sizing: border-box;
@qaharmdz
qaharmdz / ajax-form.js
Last active January 2, 2016 13:09 — forked from havvg/ajax-form.js
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(),