Skip to content

Instantly share code, notes, and snippets.

View MkDierz's full-sized avatar
🏠
Working from home

syibbran mulaesyi MkDierz

🏠
Working from home
View GitHub Profile
{{ $var }} - Echo content
{{ $var or 'default' }} - Echo content with a default value
{{{ $var }}} - Echo escaped content
{{-- Comment --}} - A Blade comment
@extends('layout') - Extends a template with a layout
@if(condition) - Starts an if block
@else - Starts an else block
@elseif(condition) - Start a elseif block
@endif - Ends a if block
@MkDierz
MkDierz / random_radio.js
Created June 26, 2021 15:27 — forked from ciamarro/random_radio.js
Randomly select all radio buttons on a form
var a = document.querySelectorAll('input[type=radio]');
for (var i=0; i<a.length; i++)
// from https://stackoverflow.com/a/18066088/8148848
a[i].checked = ( (Math.random()*10) > 5) ? true : false;
@MkDierz
MkDierz / img_train_test_split.py
Created June 13, 2020 16:19 — forked from bertcarremans/img_train_test_split.py
Split images randomly over train or validation folder
# Copyright 2014-2017 Bert Carremans
# Author: Bert Carremans <bertcarremans.be>
#
# License: BSD 3 clause
import os
import random
from shutil import copyfile
@MkDierz
MkDierz / atom-php.md
Created February 15, 2020 08:35 — forked from natanfelles/atom-php.md
Atom PHP Environment + CodeIgniter 3 & 4

Atom PHP Environment + CodeIgniter 3 & 4

Atom Editor

Install

Download and install Atom Editor:

cd ~/Downloads