Skip to content

Instantly share code, notes, and snippets.

View zakirkun's full-sized avatar
:octocat:
Hola!

Muhammad Zakir Ramadhan zakirkun

:octocat:
Hola!
View GitHub Profile
@zakirkun
zakirkun / rsa_util.go
Created July 24, 2024 08:34 — forked from miguelmota/rsa_util.go
Golang RSA encrypt and decrypt example
package ciphers
import (
"crypto/rand"
"crypto/rsa"
"crypto/sha512"
"crypto/x509"
"encoding/pem"
"log"
)

Mastodon Docker Setup

Setting up

Clone Mastodon's repository.

# Clone mastodon to ~/live directory
git clone https://github.com/tootsuite/mastodon.git live
# Change directory to ~/live

cd ~/live

@zakirkun
zakirkun / script.js
Created June 12, 2022 22:16
If You Know, You Know
const identity = x => x
const applyFNFroomOptionalParam = x => fn => (fn || identity)(x)
const add2 = a => a + 2
const ifYouKnow = applyFNFroomOptionalParam(3)
const youKnow = applyFNFroomOptionalParam(3)
console.log({
ifYouKnow: ifYouKnow(),
youKnow: youKnow(add2)
})
function generatePlayers(player, dice) {
let players = []
for (let id = 0; id < player; id++) {
let dices = []
for (let die = 0; die < dice; die++) {
dices.push(0)
}
package config
import (
"fmt"
"net"
"os"
"strconv"
"time"
"github.com/go-sql-driver/mysql"
@zakirkun
zakirkun / s9y2blogger.php
Created September 4, 2020 18:50 — forked from michitux/s9y2blogger.php
PHP script to generate a Blogger Import file from a Serendipity database, it does some automatic conversion of utf-8 using iconv
<?php
class s9y2blogger {
private $database = NULL;
private $errors = array();
private $curEntry = array(); // current entry of the parser
private $inPublished = false;
public function __construct() {
<?php
/**
* Kawal Corona
* Register here https://app.whatspie.com/
*/
$endpoint = "https://app.whatspie.com/api/messages?";
function _curl($url, $method = "GET", $postdata = null)
{
$curl = curl_init();