Skip to content

Instantly share code, notes, and snippets.

View seeruk's full-sized avatar

Elliot Wright seeruk

View GitHub Profile
@seeruk
seeruk / README.md
Created March 21, 2024 14:18 — forked from nikoheikkila/README.md
Fish Shell function for sourcing standard .env files

envsource

⚠️ NOTE (20.5.2023): I don't really use this function at all anymore since there are now tools such as Taskfile, which reads the .env file for me sparing me the need to pollute my session with environment variables.


I've been using Fish shell for years which is great and all, but one thing that has got me frustrated is using it with .env files.

When attempting to run source .env in a project, I usually encounter this problem:

@seeruk
seeruk / fabricserversidemods.md
Created November 17, 2020 18:16 — forked from comp500/fabricserversidemods.md
Useful Fabric server side mods

If you're interested in developing server side Fabric mods, check out the Fabric Server-side Development discord, and ping me (comp500#7396) if you find a server side Fabric mod not listed here.

Also see Optifine alternatives on Fabric for a few useful client side only mods!

Mods on this list are marked as outdated when they are two major Minecraft versions old - e.g. if 1.16 is the latest version, 1.14 and older mods are considered outdated.

Building

Performance

@seeruk
seeruk / docker-compose-v3.yml
Last active July 20, 2017 12:54
Concourse CI working with Docker Compose V3 syntax.
version: "3"
services:
concourse-db:
image: postgres:9.5
environment:
- POSTGRES_DB=concourse
- POSTGRES_USER=concourse
- POSTGRES_PASSWORD=changeme
- PGDATA=/database

Keybase proof

I hereby claim:

  • I am SeerUK on github.
  • I am seeruk (https://keybase.io/seeruk) on keybase.
  • I have a public key whose fingerprint is 8793 521C 17C2 B9A7 676A DD18 B57A 1FEE 9030 2C39

To claim this, I am signing this object:

@seeruk
seeruk / idea.vmoptions
Created May 26, 2015 10:51
JetBrains IDE JVM Options
-d64
-Dawt.java2d.opengl=true
-Dawt.useSystemAAFontSettings=lcd
-Xms2G
-Xmx2G
-XX:+AggressiveOpts
-XX:+CMSIncrementalPacing
-XX:+UseCompressedOops
-XX:+UseConcMarkSweepGC
-XX:+UseParNewGC
<?php
// Imagine we're in class `CacheDriver`
// ...
public function save($key, Closure $callback, $ttl = 0, $stampedeTtl = null)
{
$data = $this->cache->fetch($key);
if (false !== $data) {
@seeruk
seeruk / CacheService.js
Created November 14, 2014 12:23
Angular Caching Service
angular.module("td.service.cache", [ "td.service.timestamp" ])
.factory("CacheService", function($q, TimestampService) {
"use strict";
var CacheService = {},
pendingActions = {},
prefix = "CacheService_";
/**
iit("should handle deleting promises", function() {
var key = "key",
value = "value",
deferred = $q.defer(),
result = null;
CacheService.set(key, deferred.promise);
CacheService.get(key).then(
function(value) {
result = "resolved";
Cache.set("example", "Will I be console.log'd?");
Cache.delete("example");
var proxied = Cache.proxy("example", "Or will I?");
proxied.then(function(value) {
console.log(value);
});
@seeruk
seeruk / cachingproxy.js
Created November 13, 2014 11:48
cachingproxy.js
return Cache.proxy("foo", function() {
return $http({ method: "GET", url: "api/articles.json" })
.then(
function(result) {
return result.data.articles;
},
function(reason) {
throw new HttpException(null, reason.statusText, reason.status);
}
)