Skip to content

Instantly share code, notes, and snippets.

View ruzfi's full-sized avatar
😴
wonge lagi turu

Riyan Firmansyah ruzfi

😴
wonge lagi turu
View GitHub Profile
@ahbanavi
ahbanavi / encryption.php
Last active May 1, 2024 23:18
Encrypt / Decrypt JSON data between Python and PHP using AES 256 GCM
<?php
const PASSPHRASE = ''; // use 'openssl rand -hex 32' to generate key, same with python
function encrypt(array $data): string
{
$data_json_64 = base64_encode(json_encode($data));
$secret_key = hex2bin(PASSPHRASE);
$iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-gcm'));
$tag = '';
$encrypted_64 = openssl_encrypt($data_json_64, 'aes-256-gcm', $secret_key, 0, $iv, $tag);
@asuna
asuna / cloudflare_update.script
Last active May 5, 2024 14:33 — forked from viritt/cloudflare_update.script
Automatic script for Mikrotik RouterOS updating record on CloudFlare.
#########################################################################
# ================================================== #
# $ Mikrotik RouterOS update script for CloudFlare $ #
# ================================================== #
# #
# - You need a CloudFlare account & api key (look under settings), #
# a zone and A record in it #
# - All variables in first section are obvious, except CFid, #
# To obtain CFzoneid use following command in any unix shell: #
# curl -X GET "https://api.cloudflare.com/client/v4/zones" -H "X-Auth-Email: YOUR_EMAIL" -H "X-Auth-Key: YOUR_API_KEY" -H "Content-Type: application/json" | python -mjson.tool
@Simon-Tang
Simon-Tang / nordvpn_genmon.py
Last active March 20, 2024 19:24
NordVPN GUI when used with xfce4-genmon-plugin
#!/usr/bin/env python3
'''
# Usage
This script provides a basic (but tweakable) XFCE panel item for NordVPN, when
used in conjunction with xfce4-genmon-plugin
(https://goodies.xfce.org/projects/panel-plugins/xfce4-genmon-plugin).
The plugin also acts as a toggle button for connecting/disconnecting.

kambing ui

Debian sid

deb http://kambing.ui.ac.id/debian/ sid main contrib non-free

Debian testing

deb http://kambing.ui.ac.id/debian/ testing main contrib non-free
deb http://kambing.ui.ac.id/debian/ testing-updates main contrib non-free
deb http://kambing.ui.ac.id/debian-security/ testing/updates main main contrib non-free