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 / 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
@mohamad-supangat
mohamad-supangat / README.md
Last active April 29, 2023 00:40
Awesome hero2lte ( samsung s7 edge)
@mohamad-supangat
mohamad-supangat / README.md
Created February 10, 2023 02:46
Booting Android 10 without display / headless

remove system/vendor/bin/hw/vendor.lineage.touch@1.0-service.samsung

and also livedisplay service thats there, after that you might have to edit system/vendor/etc/vintf/manifest.xml and remove livedisplay and touch entry

add debug.sf.nobootanimation=1 to disable bootanimation in build.prop

@mohamad-supangat
mohamad-supangat / sms-mailer.py
Created December 31, 2022 14:33 — forked from joneskoo/sms-mailer.py
Send unread SMS messages (from adb shell) to email
#!/usr/bin/env python3
# Joonas Kuorilehto 2013
# This script is Public Domain.
import csv
import subprocess
import pipes
from datetime import datetime
import smtplib
@mohamad-supangat
mohamad-supangat / laravel-subdirectory.conf
Created December 3, 2022 01:25 — forked from tsolar/laravel-subdirectory.conf
Laravel in subdirectory nginx example
server {
client_body_in_file_only clean;
client_body_buffer_size 32K;
client_max_body_size 300M;
sendfile on;
send_timeout 300s;
# Port that the web server will listen on.
#listen 80;
@mohamad-supangat
mohamad-supangat / run.sh
Created November 28, 2022 01:36
Android skip setup wizard twrp
adb shell twrp mount system
adb shell twrp remountrw system
adb shell sed -i 's/ro.setupwizard.wifi_required=true/ro.setupwizard.wifi_required=false/g' /system/build.prop
echo "ro.setupwizard.mode=DISABLED" >> /system/build.prop
@mohamad-supangat
mohamad-supangat / readme.md
Last active February 7, 2024 09:26
laravel force https in all routes

Place this in the AppServiceProvider in the boot() method

if($this->app->environment('production')) {
    \URL::forceScheme('https');
}
php
@mohamad-supangat
mohamad-supangat / icheck.sh
Created October 12, 2022 03:28 — forked from bcantoni/icheck.sh
Bash script for checking internet connection status and keeping a local log when it changes. Meant to be run at some regular interval as a cron job.
#!/bin/bash
# check internet connectivity status
# file 'status' contains last known status (online or offline)
# file 'status.log' has an entry every time status changes
source ./status
echo "last status: $status at $time"
if nc -zw1 google.com 443; then
echo "online"
if [[ "$status" = "online" ]]; then