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

<?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 / 0_reuse_code.js
Last active August 29, 2015 14:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
/*
compile with:
gcc -shared -fPIC fix_umask.c -o fix_umask.so
edit /usr/bin/subl to include (fix the path to fix_umask.so if necessary):
#!/bin/sh
export LD_PRELOAD=/opt/sublime_text/fix_umask.so
exec /opt/sublime_text/sublime_text "$@"