Skip to content

Instantly share code, notes, and snippets.

View rickithadi's full-sized avatar
🔥
Focusing

hadi rickit rickithadi

🔥
Focusing
View GitHub Profile
@rickithadi
rickithadi / index.html
Created September 13, 2023 01:54
dpay lib
<script async type="text/javascript"
src="https://js.durianpay.id/0.1.39/durianpay.min.js">
</script>
@rickithadi
rickithadi / signatureVerification.js
Created September 8, 2023 03:09
dpay webhook signature verification
try {
let hmac = crypto
.createHmac(
"sha256",
process.env.NODE_ENV === "production"
? process.env.LIVE_DPAY_KEY
: process.env.STAGING_DPAY_KEY
)
.update(`${data.id}|${data.amount_str}`)
.digest("hex");
@rickithadi
rickithadi / checkoutInitialisation.js
Created September 8, 2023 03:07
client side dpay checkout init
const {
data: { access_token, id },
} = await createDurianPayOrder();
console.log(access_token, id);
// @ts-ignore
let dpay = await window.Durianpay.init({
locale: "id",
environment: "production", // Value should be 'production' for both sandbox and live mode
access_key: access_token,
// access_key:'dp_test_XXXXXXXXX',
@rickithadi
rickithadi / createDpayOrder.js
Created September 8, 2023 02:43
endpoint to create durianpay order
app.post("/create-order", (req, res) => {
// const { order_ref_id, customer_ref_id, email, amount } = req.body;
console.log(req.body);
const {
order_ref_id,
customer_ref_id,
email,
amount,
lobbyImage,
lineItemText,
@rickithadi
rickithadi / notionWorker
Created August 3, 2022 02:14
cloudflare worker to get my custom domain working with notion
/* CONFIGURATION STARTS HERE */
/* Step 1: enter your domain name like fruitionsite.com */
const MY_DOMAIN = 'surfskate.io';
/*
* Step 2: enter your URL slug to page ID mapping
* The key on the left is the slug (without the slash)
* The value on the right is the Notion page ID
*/
# Note: For proper working of this Script Good and Uninterepted Internet Connection is Required
# Keep all contacts unique
# Can save contact with their phone Number
# Import required packages
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
@rickithadi
rickithadi / vimrc
Last active August 18, 2019 05:33
my vim rc
" __ _(_)_ __ ___ _ __ _
" \ \ / / | '_ ` _ \| '__/ __|
" \ V /| | | | | | | | | (__
" \_/ |_|_| |_| |_|_| \___|
let mapleader = " "
call plug#begin('~/.config/nvim/bundle')
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'sheerun/vim-polyglot'
Plug 'prettier/vim-prettier', { 'do': 'npm install', 'for': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'graphql', 'markdown', 'vue',
@rickithadi
rickithadi / influencer.py
Created April 1, 2019 16:51
simple script to degeneracy
from instapy import InstaPy
from instapy import smart_run
import random
import requests
import json
import schedule
import time
# get a session!
def gen_comment():
@rickithadi
rickithadi / config.h
Created January 9, 2019 10:21
st config
/* See LICENSE file for copyright and license details. */
/*
* appearance
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
static char *font = "mono:pixelsize=16:antialias=true:autohint=true";
static int borderpx = 0;
/*