Skip to content

Instantly share code, notes, and snippets.

View resir014's full-sized avatar

Resi Respati resir014

View GitHub Profile
/* 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;
@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())
}
<?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 / gist:27f269b00097a3964d0c4897362cc0fc
Last active March 10, 2023 11:50
translated version for statements from @rizzydraws' family.

Updates:

  • 2018-06-18 16:22:00 GMT +7: Reworded some parts.
  • 2018-06-19 17:10:00 GMT +7: Another statement has been sent out by Riz's family. It has been added to this gist.
  • 2018-06-19 17:17:00 GMT +7: Reformatted into Markdown for easier reading.
  • 2018-06-19 17:35:00 GMT +7: Added a third statement from Riz's family.
  • 2018-06-19 17:59:00 GMT +7: Added a fourth statement
  • 2018-06-20 20:34:00 GMT +7: Added a fifth statement.
@resir014
resir014 / gatsby-node.js
Last active June 7, 2018 18:58
Simulate Jekyll's page generation on Gatsby!
// @ts-check
// Requires module: slug, gatsby-source-filesystem
const path = require('path')
const slugify = require('slug')
const { createFilePath } = require('gatsby-source-filesystem')
// Regex to parse date and title from the filename
const BLOG_POST_SLUG_REGEX = /^\/blog\/([\d]{4})-([\d]{2})-([\d]{2})-(.+)\/$/
@resir014
resir014 / screeps-inscribe.js
Created September 4, 2017 15:46
Vanilla JS (ES6!) implementation of screeps-inscribe. Copy and paste them to your Screeps code.
/*
* Inscribe - a series of helper classes for improving the logging experience
* on Screeps.
*/
/**
* Initialise Inscribe functions to the global.
*
* @export
*/
@resir014
resir014 / keybase.md
Created April 9, 2017 14:46
Keybase proof for https://keybase.io/resir014 (307F92FD)

Keybase proof

I hereby claim:

  • I am resir014 on github.
  • I am resir014 (https://keybase.io/resir014) on keybase.
  • I have a public key whose fingerprint is 0929 C31A C2B0 AF63 C6E3 D9DF BB70 B066 307F 92FD

To claim this, I am signing this object:

@resir014
resir014 / loan-screeps-alliances.md
Last active September 28, 2016 12:17
Screeps alliances list.

League of Automated Nations - Screeps Alliances

This list is no longer updated. Please go here for an up-to-date list.


This gist documents player alliances known to exist on Screeps as of 2016-09-25 11:00 UTC.

We're in the process of developing a diplomatic dashboard to track alliances and treaties. For more information, check out the #loan channel on the Screeps Slack.

@resir014
resir014 / keybase.md
Created April 14, 2015 15:25
Keybase verification for resir014.

Keybase proof

I hereby claim:

  • I am resir014 on github.
  • I am resir014 (https://keybase.io/resir014) on keybase.
  • I have a public key whose fingerprint is 0929 C31A C2B0 AF63 C6E3 D9DF BB70 B066 307F 92FD

To claim this, I am signing this object:

@resir014
resir014 / gist:10137628
Last active August 29, 2015 13:58
Second part for the abbreviated transcript of the elementary OS Get Involved Q&A hangout

[WIP!]

UPDATE: Transcipted up to 1:33:45. More coming soon.

This is the second part for the abbreviated transcript of the elementary OS Get Involved Q&A hangout, covering the second hour of the entire Q&A session.

The first part is available here.

The entire video of the hangout is available here.