Skip to content

Instantly share code, notes, and snippets.

const express = require('express');
const { exec } = require('child_process');
const app = express();
const PORT = process.env.PORT || 3000;
const GITHUB_SECRET = process.env.GITHUB_SECRET_TOKEN;
/**
* # Set github webhook to yourdomain.com(:3000 if no proxy)/api/hook ( or adjust route below )
* GITHUB_SECRET_TOKEN=your-github-secret-token
@permpkin
permpkin / CountDown.tsx
Created July 15, 2022 04:41
simple react countdown component with callback
import { useEffect, useState } from "react";
interface Props {
from: number
callback: Function
}
export const CountDown = ({ from, callback }:Props) => {
const [time, setTime] = useState(from)
let timer: NodeJS.Timeout;
@permpkin
permpkin / db.php
Last active July 14, 2022 13:09
aaemnnosttv/wp-sqlite-db
<?php
/**
* Plugin Name: WP SQLite DB
* Description: SQLite database driver drop-in. (based on SQLite Integration by Kojima Toshiyasu)
* Author: Evan Mattson
* Author URI: https://aaemnnost.tv
* Plugin URI: https://github.com/aaemnnosttv/wp-sqlite-db
* Version: 1.2.0
* Requires PHP: 5.6
*
@permpkin
permpkin / factory-utils.php
Last active May 8, 2022 07:32
Rest Routes + LiveReload for WP Factory
<?php
/*
Plugin Name: WP Factory Utils
Plugin URI: https://gist.github.com/permpkin/53cf60dd16491e9c1795b5ca08d5ce3e
Description: Utils for use on local with wp-factory.
Version: 1.0.0
Author: Permpkin
Author URI: https://github.com/permpkin/
*/
@permpkin
permpkin / WordpressFactoryValetDriver.php
Last active May 1, 2022 12:27
Wordpress Factory Valet Driver
<?php
class WordpressFactoryValetDriver extends ValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
{
"payloads": [
{
"url": "https://kameleonreloaded.github.io/900V4B/pl_webrte.bin",
"name": "WebRTE",
"description": "Lorem ipsum dolar...",
"fw": ["9.00"]
},
{
"url": "https://kameleonreloaded.github.io/900V4B/pl_goldhen20b2.bin",
{
"packages": [
{
"id": "BBFF12362",
"name": "Kill'em All.",
"desc": "Title says it all",
"image": "http://api.pkg-zone.com/storedata/killemall_icon0.png",
"package": "https://pkg-zone.com/details/BBFF12362",
"version": "1.00",
"picpath": "/user/app/NPXS39041/storedata/killemall_icon0.png",