Skip to content

Instantly share code, notes, and snippets.

View mohamad-supangat's full-sized avatar
:shipit:
Working from home

Mohmad Supangat mohamad-supangat

:shipit:
Working from home
View GitHub Profile
@mohamad-supangat
mohamad-supangat / fstab.example
Last active January 4, 2024 07:14
Install Armbian to EMMC
#/var/swap none swap sw 0 0
#/dev/root / auto noatime,errors=remount-ro 0 1
#proc /proc proc defaults 0 0
/dev/root / ext4 defaults,noatime,errors=remount-ro 0 1
tmpfs /tmp tmpfs defaults,nosuid 0 0
LABEL=BOOT_EMMC /boot vfat defaults 0 2
@mohamad-supangat
mohamad-supangat / odoo.md
Last active December 28, 2023 04:09
Perintah Penting Odoo

Masuk PSQL odoo

docker exec -it -u root odoo-clone-jvm-odoo-1   psql -h db -U odoo -W restore

update default password to Donatelo

UPDATE "res_users" set "password" = '$pbkdf2-sha512$25000$IMSY8x7j/H.vlVJKCcF4jw$4Y9C8FdNwz9FdaJJpOAVhhrlKbYQGuQhnh7nUhZZndkb7R8ndgqPvmvO5pFTvznBtyOqYVZR0alxIFzXTgz9rg';
@mohamad-supangat
mohamad-supangat / account.report_payment_receipt_document.md
Last active September 30, 2023 01:51
Print Kuitansi Pembayaran

id: account.report_payment_receipt_document

<?xml version="1.0"?>
<t t-name="account.report_payment_receipt_document">
        <t t-call="web.external_layout">
            <t t-set="o" t-value="o.with_context(lang=lang)"/>

            <div class="page" style="font-size: 12px;">
              <div class="row justify-content-end" t-if="o.partner_type">
@mohamad-supangat
mohamad-supangat / Transactional.php
Created September 13, 2023 03:35 — forked from aambrozkiewicz/Transactional.php
Laravel Middleware with Database transaction
<?php
namespace App\Http\Middleware;
use Closure;
class Transactional
{
public function handle($request, Closure $next)
{
@mohamad-supangat
mohamad-supangat / UDID
Created August 14, 2023 01:41 — forked from rvill/UDID
get iOS device UDID without xcode or itunes, using linux cmd line
lsusb -v 2> /dev/null | grep -e "Apple Inc" -A 2
@mohamad-supangat
mohamad-supangat / README.md
Created June 5, 2023 02:13
Change /var/lib/docker folder

Stop the server:

sudo systemctl stop docker

Create/edit the configuration at /etc/docker/daemon.json, for example:

{
    "data-root": "/new/path/docker-data-root"
}
@mohamad-supangat
mohamad-supangat / release
Created March 31, 2023 14:15 — forked from foca/release
Small shell script to create GitHub releases from the command line
#!/usr/bin/env bash
set -e
[ -z "$DEBUG" ] || set -x;
usage() {
echo "$0 <repo> <tag> [<release name>] [-- <asset>...]" >&2;
}
if [ "$1" = "-h" -o "$1" = "--help" ]; then
@mohamad-supangat
mohamad-supangat / add-frame.sh
Created March 21, 2023 04:59 — forked from stefanoschrs/add-frame.sh
deviceframe iPhone X hack
outputDir=/tmp/screenshots/framed
mkdir -p ${outputDir}
##########
# iPhone #
##########
padPath=/tmp/iphone-pad.png
convert -size 1125x185 xc:#e65562 ${padPath}
for filePath in $(find /tmp/screenshots/ | grep iPhone | grep -v framed) ; do
@mohamad-supangat
mohamad-supangat / github_release_script.sh
Created March 16, 2023 14:00 — forked from Jaskaranbir/github_release_script.sh
Shell script to create GitHub releases with automatically generated changelogs (using github-changelog-generator).
#!/bin/bash
# ===> Set these variables first
branch="$GIT_BRANCH"
# Example: "Jaskaranbir/MyRepo"
repo_slug="$TRAVIS_REPO_SLUG"
token="$GITHUB_TOKEN"
version="$TRAVIS_TAG"
# An automatic changelog generator