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
<?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();
@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() {
package config
import (
"fmt"
"net"
"os"
"strconv"
"time"
"github.com/go-sql-driver/mysql"
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)
}
@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)
})

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