Skip to content

Instantly share code, notes, and snippets.

View zllovesuki's full-sized avatar

Rachel Chen zllovesuki

View GitHub Profile
@zllovesuki
zllovesuki / specter.json
Last active March 26, 2024 04:06
Gist-as-a-KV
{"schemaVersion":1,"label":"Coverage","message":"40.6","color":"red"}
CREATE TABLE IF NOT EXISTS `domains` (
id INT AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
master VARCHAR(128) DEFAULT NULL,
last_check INT DEFAULT NULL,
type VARCHAR(6) NOT NULL,
notified_serial INT UNSIGNED DEFAULT NULL,
account VARCHAR(40) DEFAULT NULL,
PRIMARY KEY (id),
UNIQUE INDEX `name_index` (`name`)
# source: https://github.com/tcely/dockerhub-powerdns/blob/e96732791a22595def6b2988c1368b0aee66de5d/authoritative/Dockerfile
# changes:
# 1. removed unused backends
# 2. use make -j$(nproc) to speed up deployment builds
# 3. compile with libmaxminddb-dev
FROM alpine AS builder
ARG AUTH_VERSION
@zllovesuki
zllovesuki / Objects.java
Last active October 5, 2019 05:37
Interface Example
public interface MovableObject {
void move();
}
public abstract class Animal implements MovableObject {
abstract public void walk();
}
public class Human extends Animal {
@Override
<?php
$_SERVER['DOCUMENT_ROOT'] = ini_get('doc_root');
$_SERVER['SCRIPT_FILENAME'] = str_replace($_SERVER['HOME'], '', $_SERVER['SCRIPT_FILENAME']);
@zllovesuki
zllovesuki / website1.conf
Created June 16, 2014 06:15
/etc/nginx/site-enabled/website1.conf
server {
listen 80;
server_name example.tld;
root /home/dir/web;
access_log /home/dir/var/log/nginx_access.log;
error_log /home/dir/var/log/nginx_error.log error;
location ~ \.php$ {
try_files $uri =404;
@zllovesuki
zllovesuki / website1.conf
Created June 16, 2014 06:11
/etc/php-fpm.d/website1.conf
[website1]
prefix = /home/dir
listen = var/fcgi/php.sock
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
listen.mode = 0666
user = tony
@zllovesuki
zllovesuki / convert.php
Created June 16, 2014 06:07
cp commands generator
<?php
$string = 'put
the
ldd /path/to/convert
results
in
here';
$array = explode("\n", $string);
<?php
require_once(dirname(__FILE__) . '/icc.php');
class Darkroom {
public static $presets = array(
'tiny' => array(
'width' => 60,
'height' => 60
@zllovesuki
zllovesuki / settings.php
Created June 14, 2014 06:09
app/application/controllers/settings.php
<?php
class Settings extends Koken_Controller {
function __construct()
{
parent::__construct();
}
function index()