Skip to content

Instantly share code, notes, and snippets.

View darkterminal's full-sized avatar
🕺
Dancing While Coding

Imam Ali Mustofa darkterminal

🕺
Dancing While Coding
View GitHub Profile
@darkterminal
darkterminal / pdf-example.blade.php
Created November 27, 2020 14:44 — forked from alfredoem/pdf-example.blade.php
Template for a invoice render with DomPDF
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Aloha!</title>
<style type="text/css">
* {
font-family: Verdana, Arial, sans-serif;
}
@darkterminal
darkterminal / canvas2pdf.html
Last active November 23, 2020 05:47
Created by SnippLeaf.com
<!-- Srouce From: https://jsfiddle.net/user/marksalvania/fiddles/ -->
<!DOCTYPE html>
<html>
<head>
<title>Canvas2PDF</title>
<style>
body {
background: beige;
}
@darkterminal
darkterminal / imgbb-upload-helper.php
Created October 1, 2020 00:12
Host Image using imgbb.com and upload using this method
<?php
function imgbb_upload( $image, $filename, $key ) {
$cfile = new CURLFile(realpath($image));
$postfields = [
"key" => $key,
"image" => $cfile,
"name" => $filename
];
@darkterminal
darkterminal / EAN-13_example.php
Created July 16, 2020 16:31
Created by SnippLeaf.com
<?php
class EAN13 {
private $code = null;
private $prefix = false;
public function __construct ($prefix = false) {
$this->prefix = $prefix === false ? false : (string) $prefix;
}
@darkterminal
darkterminal / loopdivider.php
Last active July 16, 2020 16:27
Created by SnippLeaf.com
<?php
for ($i = 10; $i <= 100; $i=$i+10) {
echo $i . "<br>";
}
/*
Result:
10
20
@darkterminal
darkterminal / EAN13.php
Created July 16, 2020 15:21
Created by SnippLeaf.com
<?php
class EAN13 {
private $code = null;
private $prefix = false;
public function __construct ($prefix = false) {
$this->prefix = $prefix === false ? false : (string) $prefix;
}
@darkterminal
darkterminal / validate_barcode.js
Created June 11, 2020 19:50 — forked from spig/validate_barcode.js
Validate a barcode UPC-E, UPC-A, EAN, EAN-14, SSCC
// checksum calculation for GTIN-8, GTIN-12, GTIN-13, GTIN-14, and SSCC
// based on http://www.gs1.org/barcodes/support/check_digit_calculator
function isValidBarcode(barcode) {
// check length
if (barcode.length < 8 || barcode.length > 18 ||
(barcode.length != 8 && barcode.length != 12 &&
barcode.length != 13 && barcode.length != 14 &&
barcode.length != 18)) {
return false;
}
@darkterminal
darkterminal / Aplikasi-Kasir-v1.0.md
Last active June 9, 2020 14:29
Aplikasi Kasir Berbasis Website - Betta Dev Indonesia

🎢 APLIKASI KASIR - Berbasis Website

Dashboard Screenshoot Image

Aplikasi Kasir Berbasis Website yang dibuat oleh Betta Dev Indonesia memungkinkan pengguna untuk mengelola toko lebih baik. Apa saya fitur yang tersedia pada Aplikasi Kasir ini:

  • Sistem Otentikasi (Untuk Installasi Lokal)
  • Hak Akses
@darkterminal
darkterminal / block_bad_words.php
Created June 2, 2020 23:23
Created by SnippLeaf.com
<?php
function bbw( $kata ) {
$Block = array('asu','up','babi','perek'); // kata yang ingin diblok
$sensor = preg_replace("/(\b|[0-9_])(".implode('|',$Block).")(\b|[0-9_])/i", '***', $kata);
return $sensor;
1) Create a branch with the tag
git branch {tagname}-branch {tagname}
git checkout {tagname}-branch
2) Include the fix manually if it's just a change ....
git add .
git ci -m "Fix included"
or cherry-pick the commit, whatever is easier
git cherry-pick {num_commit}