Skip to content

Instantly share code, notes, and snippets.

View PurpleBooth's full-sized avatar

Billie Thompson PurpleBooth

View GitHub Profile
@klmr
klmr / Makefile
Last active March 21, 2024 19:55
Self-documenting makefiles
# Example makefile with some dummy rules
.PHONY: all
## Make ALL the things; this includes: building the target, testing it, and
## deploying to server.
all: test deploy
.PHONY: build
# No documentation; target will be omitted from help display
build:
<?php
// This file is not a CODE, it makes no sense and won't run or validate
// Its AST serves IDE as DATA source to make advanced type inference decisions.
namespace PHPSTORM_META {
$STATIC_METHOD_TYPES = [
\Zend\ServiceManager\ServiceLocatorInterface::get('') => [
// STATIC call key to make static (1) & dynamic (2) calls work
"special" instanceof \Exception,
// "KEY" instanceof Class maps KEY to Class
@chartjes
chartjes / cycle-list.php
Created March 27, 2017 20:32
My PHP script for creating a Twitter list where people cycle on and off it based on 30 days of interaction
<?php
require "vendor/autoload.php";
use Abraham\TwitterOAuth\TwitterOAuth;
// You can get all these via https://dev.twitter.com/
$consumer_key = "";
$consumer_secret = "";
$access_token = "";
$access_token_secret = "";
$user_id = 0; // Twitter user ID