Skip to content

Instantly share code, notes, and snippets.

View resir014's full-sized avatar

Resi Respati resir014

View GitHub Profile
<?php
// Header AI ====================================================================================================================
error_reporting(1);
header("Content-type: text/html; charset=utf-8");
ini_set("max_execution_time", 30);
date_default_timezone_set("Asia/Jakarta");
$module = basename(__FILE__,".php");
define("_MODULE" , $module);
define("_AI_TOKEN" , "YmxjaGVlaW9paGZuamhsamxnMTU0Q29lVTJyMm5PVTA3OTg4OWxRZGJ3Nk5XbU1Z");
@resir014
resir014 / useClock.ts
Created December 27, 2019 11:58
useClock hook
import * as React from 'react'
import useInterval from './useInterval'
export default function useClock() {
const [time, setTime] = React.useState<Date>(new Date())
const tick = () => {
setTime(new Date())
}
/* Public Domain (or CC0) */
a.media-image[title]::after,
a.media-item[title]::after {
content: 'ALT';
position: absolute;
bottom: 0.2em;
background: rgba(0, 0, 0, 0.6);
padding: 0.2em 0.3em;
font-size: 0.75em;