Skip to content

Instantly share code, notes, and snippets.

View addshore's full-sized avatar
🏄

addshore

🏄
View GitHub Profile
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot PATH
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory PATH >
Options Indexes FollowSymLinks MultiViews
@addshore
addshore / gist:1c5612b7aa358bb6ac25
Last active August 29, 2015 14:03
Opencorporates - Claim Creator
<?php
require_once( __DIR__ . "/vendor/autoload.php" );
// Set stuff up
$api = new \Mediawiki\Api\MediawikiApi( 'http://www.wikidata.org/w/api.php' );
$api->login( new \Mediawiki\Api\ApiUser( 'USERNAME', 'PASSWORD' ) );
$services = new \Wikibase\Api\WikibaseFactory( $api );
// Stuff we need for each item!
@addshore
addshore / gist:04863ade4960c5616135
Last active August 29, 2015 14:05
PHP Returning $this from __construct
// What can be done
class Foo {
function echo( $string ) {
echo $string;
return $this;
}
}
$foo = new Foo();
#!/usr/bin/env php
<?php
use Phergie\Irc\Bot\React\Bot;
use Phergie\Irc\Bot\React\EventQueueInterface as Queue;
use Phergie\Irc\Client\React\Client;
use Phergie\Irc\Client\React\WriteStream;
use Phergie\Irc\Connection;
use Phergie\Irc\ConnectionInterface;
use Phergie\Irc\Event\ServerEvent;
@addshore
addshore / xhprof-general.json
Created September 4, 2015 10:23
Grafana Xhprof General Dashboard
{
"id": null,
"title": "Xhprof General",
"originalTitle": "Xhprof General",
"tags": [
"API"
],
"style": "dark",
"timezone": "utc",
"editable": true,

Keybase proof

I hereby claim:

  • I am addshore on github.
  • I am addshore (https://keybase.io/addshore) on keybase.
  • I have a public key whose fingerprint is 0A41 CF8D FB65 73F4 7FB1 FCC8 7ADD ABC3 E684 2FB3

To claim this, I am signing this object:

WITH
wikipedias AS (
SELECT
DISTINCT dbname
FROM wmf_raw.mediawiki_project_namespace_map
WHERE snapshot = '2018-02'
AND hostname LIKE '%wikipedia.org'
),
wikidata_editors AS (
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: traefik-ingress-controller
namespace: kube-system
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
# ------------------- Dashboard Secret ------------------- #
# ------------------- Dashboard Secret ------------------- #
apiVersion: v1
kind: Secret
metadata:
labels:
k8s-app: kubernetes-dashboard
name: kubernetes-dashboard-certs
apiVersion: apps/v1
kind: Deployment
metadata:
name: guids
labels:
app: guids
spec:
replicas: 2
selector:
matchLabels: