Skip to content

Instantly share code, notes, and snippets.

View benbristow's full-sized avatar

Ben Bristow benbristow

View GitHub Profile
-----> uname: Linux dokku 4.15.0-36-generic #39-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
-----> memory:
total used free shared buff/cache available
Mem: 1993 407 737 1 848 1397
Swap: 0 0 0
-----> docker version:
Client:
Version: 18.06.1-ce
API version: 1.38
Go version: go1.10.3
Verifying my Blockstack ID is secured with the address 1J97m2GJHkLwr6WSHhmKaPd24uNZP4N4dT https://explorer.blockstack.org/address/1J97m2GJHkLwr6WSHhmKaPd24uNZP4N4dT
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: samdb
-- ------------------------------------------------------
-- Server version 5.0.45-community-nt
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
@benbristow
benbristow / stash.php
Created November 20, 2017 16:27
Implementation of 'Rails.cache.fetch' using Stash PHP Library
<?php
use Stash\Driver\Redis;
use Stash\Pool;
class Cache {
public static function fetch(String $namespace, String $key, $expiresAfter, $callback) {
$pool = new Pool(new Redis());
$item = $pool->getItem($namespace . '/' . hash('sha256', $key));
$data = $item->get();
### Keybase proof
I hereby claim:
* I am benbristow on github.
* I am benbristow (https://keybase.io/benbristow) on keybase.
* I have a public key ASCApn9yp6zyU59A6P7jDlSkaWkEkxWBDo3Zg7JpZVoupAo
To claim this, I am signing this object:
mail:
image: "analogic/poste.io"
container_name: "mail"
ports:
- "25:25"
- "110:110"
- "143:143"
- "465:465"
- "587:587"
- "993:993"
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Writeline
{
class Program
{
xccx
@benbristow
benbristow / install-pacaur.sh
Created September 3, 2015 20:52 — forked from rumpelsepp/install-pacaur.sh
A small script for arch linux which builds and installs "pacaur" automatically. Fixed for use with new git-based AUR.
#!/usr/bin/env bash
# The MIT License (MIT)
#
# Copyright (c) 2015 Stefan Tatschner
# Modified by Ben Bristow (c) 2015
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
[20:06:13 INFO]: benbb issued server command: /plotme claim
[20:06:13 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'plotme' in plugin PlotMe v0.17
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[server.jar:git-Bukkit-0a645a2]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:140) ~[server.jar:git-Bukkit-0a645a2]
at org.bukkit.craftbukkit.v1_8_R2.CraftServer.dispatchCommand(CraftServer.java:625) ~[server.jar:git-Bukkit-0a645a2]
at net.minecraft.server.v1_8_R2.PlayerConnection.handleCommand(PlayerConnection.java:1083) [server.jar:git-Bukkit-0a645a2]
at net.minecraft.server.v1_8_R2.PlayerConnection.a(PlayerConnection.java:943) [server.jar:git-Bukkit-0a645a2]
at net.minecraft.server.v1_8_R2.PacketPlayInChat.a(SourceFile:37) [server.jar:git-Bukkit-0a645a2]
at net.minecraft.server.v1_8_R2.PacketPlayInChat.a(SourceFile:9) [server.jar:git-Bukkit-0a645a2]