Skip to content

Instantly share code, notes, and snippets.

Avatar
🤖
Never Stop Learning

M. Z Mustofa zendzo

🤖
Never Stop Learning
View GitHub Profile
View Oh my zsh with autosuggestions & syntax-highlighting.md

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@zendzo
zendzo / git-commit-template.md
Created Nov 16, 2020 — forked from lisawolderiksen/git-commit-template.md
Use a Git commit message template to write better commit messages
View git-commit-template.md

Using Git Commit Message Templates to Write Better Commit Messages

One of my colleagues shared an article on writing (good) Git commit messages today: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the

@zendzo
zendzo / service-worker.js
Last active Oct 23, 2018
My Service Worker Experiment Google Kejar MWS Batam 2018
View service-worker.js
// for caches version on the browser so when we change the version, old version of caches will be reaplaced
var VERSION = 'static-assets-01';
self.addEventListener('install', function(event) {
event.waitUntil(
caches.open(VERSION).then(function(cache) {
return cache.addAll([
'/',
'/index.html',
'/main.js',
@zendzo
zendzo / bubble-sort.js
Created Oct 17, 2018 — forked from fed/bubble-sort.js
Bubble Sort
View bubble-sort.js
const numbers = [13, 5, -3, 7, 6, 4, 1, 17, 0, -1, -2];
function sort(arr) {
const sorted = arr.slice();
let swapped;
do {
swapped = false;
for (let i = 0, l = sorted.length; i < l; i++) {
@zendzo
zendzo / PreviewOfUpcomingPackage.php
Created Sep 24, 2018 — forked from calebporzio/PreviewOfUpcomingPackage.php
A model trait that allows child models to use parent table names and relationship keys.
View PreviewOfUpcomingPackage.php
<?php
namespace App\Abilities;
use Illuminate\Support\Str;
use ReflectionClass;
/**
* Note: This is a preview of an upcoming package from Tighten.
**/
@zendzo
zendzo / settings.json
Last active Sep 10, 2018
My Personal VsCode Settings with Fira Code, Dunk Mono Font and Ocean Material Theme
View settings.json
// Place your settings in this file to overwrite the default settings
{
"workbench.iconTheme": "material-icon-theme",
"emmet.syntaxProfiles": {
"blade": "html"
},
"editor.tabCompletion": true,
"editor.fontSize": 16,
"editor.lineHeight": 30,
"editor.tabSize": 2,
View h3-gradient.css
.entry h3, .entry h4, .rs {
font-size: 22px;
color: #d01759;
font-weight: 900;
background: -webkit-linear-gradient(45deg, #b03ffc 0%,#00bcfe 50%,#00bcfe 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
line-height: 30px;
padding-top: 10px;
text-align: left;
View my Arch Linux cheat-sheet
Installing Arch:
sudo vim /etc/pacman.conf
Update packages list: sudo pacman -Syy
run sudo pacman -Syu before installing any software (to update the repositories first)
* Timing issue:
- Change hardware clock to use UTC time:
sudo timedatectl set-local-rtc 0
View _ide_helper.php
<?php
/**
* An helper file for Laravel 4, to provide autocomplete information to your IDE
* Generated for Laravel 4.2.8 on 2014-08-26.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
View _ide_helper.php
<?php
/**
* An helper file for Laravel 4, to provide autocomplete information to your IDE
* Generated with https://github.com/barryvdh/laravel-ide-helper
* Updated for Laravel 4.2.1 (2014-06-01)
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
*/
namespace {