Skip to content

Instantly share code, notes, and snippets.

View PanjiNamjaElf's full-sized avatar
🐱
Hello nyaa~~~

Panji Setya Nur Prawira PanjiNamjaElf

🐱
Hello nyaa~~~
  • Isekai World
  • 23:34 (UTC +07:00)
View GitHub Profile
@PanjiNamjaElf
PanjiNamjaElf / new empty git branch.md
Last active May 29, 2020 07:25 — forked from ozh/new empty git branch.md
Create a new empty branch in Git
$ git checkout --orphan NEWBRANCH
$ git rm -rf .

--orphan creates a new branch, but it starts without any commit. After running the above command you are on a new branch "NEWBRANCH", and the first commit you create from this state will start a new history without any ancestry.

You can then start adding files and commit them and they will live in their own branch. If you take a look at the log, you will see that it is isolated from the original log.

@PanjiNamjaElf
PanjiNamjaElf / laravel.js
Created June 14, 2020 13:23 — forked from JeffreyWay/laravel.js
Want to send a DELETE request when outside of a form? This will handle the form-creation bits for you dynamically, similar to the Rails implementation. (Requires jQuery, but doesn't have to.) To use, import script, and create a link with the `data-method="DELETE"` attribute.
/*
<a href="posts/2" data-method="delete"> <---- We want to send an HTTP DELETE request
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-confirm="Are you sure?">
*/
(function() {
@PanjiNamjaElf
PanjiNamjaElf / 00_etc-hosts.md
Created August 31, 2020 01:27 — forked from mul14/00_etc-hosts.md
/etc/hosts for Vimeo, Reddit, and Imgur.

Unblock Vimeo, Reddit, Imgur, dan NPM

Saya support Internet Positif untuk memblokir porn, situs judi, dan hal-hal ilegal lainnya. Tapi pemerintah dan ISP sangat konyol karena tidak mengizinkan akses ke Vimeo, Reddit, Imgur, Netflix--yang mana bukanlah situs dengan konten utama ilegal.

Linux / BSD / macOS

Tambahkan list di bawah ke /etc/hosts.

Windows

@PanjiNamjaElf
PanjiNamjaElf / git-make-empty-root.sh
Created October 7, 2020 11:26 — forked from nicktoumpelis/git-make-empty-root.sh
Create an empty initial commit
git checkout --orphan temp_master
git rm -rf .
git commit --allow-empty -m 'Make initial root commit'
git rebase --onto temp_master --root master
git branch -D temp_master

Conventinal Commit Messages

See how a minor change to your commit message style can make a difference. Examples

Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs

Commit Formats

Default

@PanjiNamjaElf
PanjiNamjaElf / autoload.php
Created November 20, 2020 23:54 — forked from sheabunge/autoload.php
Basic PHP class autoloader that follows the WordPress coding standards for class names and class filenames
<?php
namespace Shea\Example_Plugin;
/**
* Enable autoloading of plugin classes in namespace
* @param $class_name
*/
function autoload( $class_name ) {
@PanjiNamjaElf
PanjiNamjaElf / Kernel.php
Created December 24, 2020 02:18 — forked from phillipsharring/Kernel.php
Laravel Artisan command to perform MySQL Dump using database connection information in the .env file. Forked from https://gist.github.com/kkiernan/bdd0954d0149b89c372a
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
@PanjiNamjaElf
PanjiNamjaElf / conventional-commits.md
Created December 24, 2020 06:40 — forked from Zekfad/conventional-commits.md
Conventional Commits Cheatsheet

Quick examples

  • feat: new feature
  • fix(scope): bug in scope
  • feat!: breaking change in API
  • chore(deps): update dependencies

Commit types

  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • chore: Changes wich doesn't change source code or tests e.g. chnages to the build process, auxiliary tools, libraries
@PanjiNamjaElf
PanjiNamjaElf / funny.md
Created January 6, 2021 02:03 — forked from fguisso/funny.md
Funny initial commit messages

Funny initial commit messages

This is where it all begins...
Commit committed
Version control is awful
COMMIT ALL THE FILES!
The same thing we do every night, Pinky - try to take over the world!
Lock S-foils in attack position
This commit is a lie
I'll explain when you're older!
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class ScrapeFunko extends Command
{
/**
* The name and signature of the console command.