Skip to content

Instantly share code, notes, and snippets.

View dyazincahya's full-sized avatar
🔥
plus ultra

Kang Cahya dyazincahya

🔥
plus ultra
View GitHub Profile
@dyazincahya
dyazincahya / disable-autofill-input.directive.ts
Created November 12, 2024 13:56
Angular directive to disable browser autofill on input forms (Tested Angular 18)
import {
Directive,
Renderer2,
ElementRef,
HostListener,
AfterViewInit,
} from '@angular/core';
@Directive({
selector: '[DisableAutofillInput]',
@dyazincahya
dyazincahya / readme.md
Last active June 14, 2024 11:59
Save Contact to Phonebook Utils for Nativescript 8 (core JS) (Android or IOS)

Dependency

You need Utils, isAndroid, isIOS from @nativescript/core. This util does not require contact permissions, because the way this util works is only sending data to the default contact app.

Usage

Import

import { saveToPhoneBook } from "~/util_phonebook";
@dyazincahya
dyazincahya / readme.md
Created June 10, 2024 06:06
Audio Player Utils for Nativescript 8 (core JS) (Android)

Dependency

Before using this Utils, yout must add native depedencies in App_Resources/Android/app.gradle

implementation 'com.google.android.exoplayer:exoplayer:2.19.1'

Usage

TS Import

@dyazincahya
dyazincahya / file_get_contents_helper.php
Created February 11, 2024 10:25
Simple Helper file_get_contents PHP for access API with method GET POST PUT and DELETE
<?php
function makeApiRequest($url, $params = [], $method = 'GET') {
$options = [
'http' => [
'method' => $method,
'header' => 'Content-Type: application/x-www-form-urlencoded',
'content' => http_build_query($params),
],
];
@dyazincahya
dyazincahya / cURL_helper.php
Last active February 11, 2024 08:21
Simple Helper cURL PHP for access API with method GET POST PUT and DELETE
<?php
function makeApiRequest($url, $params = [], $method = 'GET') {
// Initialize cURL session
$ch = curl_init($url);
// Set common cURL options
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Return the response as a string instead of outputting it
// Set method-specific cURL options
if ($method === 'POST') {
@dyazincahya
dyazincahya / readme.md
Created October 20, 2023 13:58
Using AdGuard DNS over HTTPS (DoH) on Windows 11

Why

You may want to use AdGuard's DNS over HTTPS[^2] service if you

  1. Want to make it harder for your ISP to know what websites you are requesting
  2. Want to block most traditional ads from your web browsing experience across your entire PC

Setup instructions

  1. Open PowerShell
@dyazincahya
dyazincahya / gist:a5e148d1a102aeb9f6793db248be2ffe
Created October 4, 2023 02:55 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@dyazincahya
dyazincahya / remove_bloatware_redmi_note11.bat
Created April 1, 2023 13:43
Bulk remove bloatware for Xiaomi Redmi Note 11
@echo off
set /p Y=Enter adb.exe folder path:
cd %Y%
adb devices
pause
for %%X in (
"com.xiaomi.glgm"
"pm uninstall 'com.google.android.apps.magazines"
"com.neptune.domino"
"com.jobstreet.jobstreet"
@dyazincahya
dyazincahya / slide-images.html
Created August 24, 2021 02:06
Simple slide image like app store web apple
<!DOCTYPE html>
<html>
<head>
<style>
.slide-ss-mobile:before {
content: 'Screenshoot';
display: block;
margin-bottom : 15px;
text-transform : uppercase;
font-weight: bold;
@dyazincahya
dyazincahya / list-experience.css
Last active August 15, 2021 07:40
Snippet Code Experience list HTML CSS
.experienceList{
text-align:center;
font-family: "Montserrat",sans-serif;
}
.experienceList > h2 { color: #616161; }
.experiencePart > h4 {
font-size: 14px;
text-transform: uppercase;
letter-spacing: 1px;
color: #424242;