Skip to content

Instantly share code, notes, and snippets.

View seeruk's full-sized avatar

Elliot Wright seeruk

View GitHub Profile
(function(window, undefined) {
var Class = function() {
// Realistically assigning this to a variable is uneccessary
var constructor = (function() {
console.log("I have just been instantiated!");
})();
var privProperty = "foo";
@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);
}
)
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);
});
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";
@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_";
/**
<?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 / 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

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 / 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
@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