Skip to content

Instantly share code, notes, and snippets.

View Gimenz's full-sized avatar
🌴
On vacation

Muhamad Ristiyanto Gimenz

🌴
On vacation
View GitHub Profile
@Gimenz
Gimenz / Rupiah.as
Created November 9, 2020 08:56 — forked from faisalman/Rupiah.as
Konversi Angka ke format Rupiah & vice versa (C#, PHP, JavaScript, ActionScript 3.0)
package
{
/**
* ActionScript 3.0 Code Snippet
* Convert Number to Rupiah & vice versa
* https://gist.github.com/845309
*
* Copyright 2011-2012, Faisalman
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license
@Gimenz
Gimenz / S3Upload.js
Created January 26, 2021 09:35 — forked from deanmcpherson/S3Upload.js
Upload image to S3, generates unique name
var FileTransfer = require('@remobile/react-native-file-transfer');
var s3Conf = {
key: 'KEY',
bucket: 'BUCKET_NAME',
aws_url: 'https://BUCKET_NAME.REGION.amazonaws.com'
}
var guid = (function() {
function s4() {
@Gimenz
Gimenz / cashback_counter.js
Last active August 3, 2021 14:05
Hitung Cashback
// source https://nilaimutlak.id/cara-menghitung-diskon/
/**
* JavaScript Code Snippet
* Online Shop Cashback Counter
*
* Copyright 2021, Muhamad Ristiyanto
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license
*
@Gimenz
Gimenz / fake_name.js
Created August 7, 2021 20:51
get random fake name using nodejs
const { default: axios } = require('axios');
const { JSDOM } = require('jsdom');
async function fakeName(age, gender = 'female', country = 'id_ID') {
try {
if (gender == 'female') {
gender = '100'
} else if (gender == 'male') {
gender == '0'
} else {
@Gimenz
Gimenz / wa-decrypt.js
Created May 6, 2023 03:30
a function to decrypt WA Media
/**
* this code is copied from https://github.com/open-wa/wa-decrypt-nodejs
* i just made it more simplified
*/
const { default: axios } = require('axios');
const crypto = require('crypto');
const hkdf = require('futoin-hkdf');
const atob = require('atob');
@Gimenz
Gimenz / vpsroot.sh
Last active August 8, 2023 14:17
vpsroot.sh
#!/bin/bash
# Mod By SL
#echo "$crot ALL=(ALL:ALL) ALL" >> /etc/sudoers;
wget -qO- -O /etc/ssh/sshd_config https://raw.githubusercontent.com/fisabiliyusri/Mantap/main/sshd_config;
systemctl restart sshd;
clear;
echo -e "Masukkan Password:";
read -e pwe;
usermod -p `perl -e "print crypt("$pwe","Q4")"` root;
clear;
@Gimenz
Gimenz / canvas-txt-with-stroke.js
Last active March 1, 2024 19:55
canvas-txt with stroke
// Hair space character for precise justification
const SPACE = '\u200a'
const canvasTxt = {
debug: false,
align: 'center',
vAlign: 'middle',
fontSize: 14,
fontWeight: '',
fontStyle: '',
@Gimenz
Gimenz / code-server-vps.md
Created April 10, 2024 08:54
install vs code-server on vps

installing vs code-server to edit the code remotely

Installation

basicly, you can installing by read the doc at https://code-server.dev/ but i made this gist for more easier and simples to reading.

  • install curl -fsSL https://code-server.dev/install.sh | sh
  • start sudo systemctl enable --now code-server@$USER'
  • edit the ip, port, and password at nano ~/.config/code-server/config.yaml

the bind-ip is your vps ip addresses, and the port you can wrote as you fun

@Gimenz
Gimenz / how-to-get-youtube-thumbnail.md
Created June 14, 2024 04:10
get youtube thumbnail easily

tentang apa itu https://i.ytimg.com adalah cdn yang dimiliki youtube, untuk menampilkan thumbnail pada sebuah video di youtube. kita bisa mengambil thumbnail video youtube dengan simpel dan sangat mudah

https://i.ytimg.com/vi/[id]/[quality].[format]

pada bagian [id] bisa di ganti dengan id video youtube yang akan diambil thumbnailnya, juga pada [quality] adalah kualitas atau resolusi thumbnail yang akan diambil untuk [format] itu terdapat 2 format yang tersedia, adalah jpg dan webp