Skip to content

Instantly share code, notes, and snippets.

@thislooksfun
thislooksfun / upload
Last active June 26, 2016 23:32
Work with Screeps modules in folders
mkdir dist
cd javascript
for f in $(find . -name '*.js'); do
f1="${f/.\//}"
cp $f "../dist/${f1//\//.}"
done
cd ..
grunt screeps
@thislooksfun
thislooksfun / progress.htm
Created September 7, 2015 04:03
Simple html5 / css3 / js progress bar example. Go nuts.
<html>
<head>
<title>Progress bar testing</title>
<style>
body {
background-color: #444;
margin: 0 25%;
}
.bar_container {
@thislooksfun
thislooksfun / InfiniteScroll.js
Created July 17, 2015 04:24
Custom tumblr infinite scrolling
var tumblrAutoPager={url:"http://proto.jp/",ver:"0.1.7",rF:true,gP:{},pp:null,ppId:"",LN:location.hostname,init:function(){if($("autopagerize_icon")||navigator.userAgent.indexOf('iPhone')!=-1)return;var tAP=tumblrAutoPager;var p=1;var lh=location.href;var lhp=lh.lastIndexOf("/page/");var lht=lh.lastIndexOf("/tagged/");if(lhp!=-1){p=parseInt(lh.slice(lhp+6));tAP.LN=lh.slice(7,lhp);}else if(lht!=-1){tAP.LN=lh.slice(7);if(tAP.LN.slice(tAP.LN.length-1)=="/")tAP.LN=tAP.LN.slice(0,tAP.LN.length-1);}else if("http://"+tAP.LN+"/"!=lh){return;};var gPFncs=[];gPFncs[0]=function(aE){var r=[];for(var i=0,l=aE.length;i<l;i++){if(aE[i].className=="autopagerize_page_element"){r=gCE(aE[i]);break;}}
return r;};gPFncs[1]=function(aE){var r=[];for(var i=0,l=aE.length;i<l;i++){var arr=aE[i].className?aE[i].className.split(" "):null;if(arr){for(var j=0;j<arr.length;j++){arr[j]=="post"?r.push(aE[i]):null;}}}
return r;};gPFncs[2]=function(aE){var r=[];var tmpId=tAP.ppId?[tAP.ppId]:["posts","main","container","content","apDiv2","wrap
package tlf.snake.main;
import tlf.snake.main.game.helper.Pos;
import tlf.snake.main.game.input.Input;
import java.awt.Font;
import java.nio.ByteBuffer;
import java.nio.IntBuffer;
This file has been truncated, but you can view the full file.
~/Desktop/vidr/src/github.com/thislooksfun/goblin => for i in {1..1000}; do echo "Iteration #$i"; go test -v; done; say done
Iteration #1
=== RUN TestEqual
--- PASS: TestEqual (0.00s)
=== RUN TestIsTrue
--- PASS: TestIsTrue (0.00s)
=== RUN TestIsFalse
--- PASS: TestIsFalse (0.00s)
=== RUN TestIsFalseWithMessage
--- PASS: TestIsFalseWithMessage (0.00s)
@thislooksfun
thislooksfun / gist:40279afd8122df589fdf
Created May 12, 2015 21:23
Crashlog (EnviroMine-1.7#134)
---- Minecraft Crash Report ----
// I bet Cylons wouldn't have this problem.
Time: 12/05/15 22.56
Description: Updating screen events
java.lang.IllegalStateException: The fluid registry is corrupted
at net.minecraftforge.fluids.FluidRegistry.getDefaultFluidName(FluidRegistry.java:294)
at net.minecraftforge.fluids.FluidRegistry.writeDefaultFluidList(FluidRegistry.java:324)
at net.minecraftforge.common.ForgeModContainer.getDataForWriting(ForgeModContainer.java:314)
{
defaultName: "default",
items: {
default: {
B:"03.Enable Ambient Temperature"=false
D:"04.Ambient Temperature"=0.0
D:"05.Ambient Air Quality"=0.0
D:"06.Ambient Santity"=-0.1
D:"07.Effect Temperature"=0.0
D:"08.Effect Air Quality"=0.0
import ddf.minim.*;
import ddf.minim.analysis.*;
Minim minim;
AudioInput in;
FFT fft;
int highest=0;
void setup()
{
@thislooksfun
thislooksfun / proof.tlf
Created January 18, 2015 22:26
Ideas for programming language built on top of Java
//If statement
//Java:
if (foo != null && foo != bar) {}
//TLF:
if (foo != null &!= bar) {}
&= bar <is equal to> && foo == bar
&! bar <is equal to> && foo != bar
&.* bar <is equal to> && foo.*(bar)
@thislooksfun
thislooksfun / gist:67323216ced275d827cc
Created January 18, 2015 21:40
Crash on world load
java.lang.InstantiationException: nbtreader.tileentity.TileEntityNBTBase
at java.lang.Class.newInstance(Class.java:364)
at net.minecraft.tileentity.TileEntity.createAndLoadEntity(TileEntity.java:123)
at net.minecraft.world.chunk.storage.AnvilChunkLoader.loadEntities(AnvilChunkLoader.java:525)
at net.minecraftforge.common.chunkio.ChunkIOProvider.callStage2(ChunkIOProvider.java:41)
at net.minecraftforge.common.chunkio.ChunkIOProvider.callStage2(ChunkIOProvider.java:12)
at net.minecraftforge.common.util.AsynchronousExecutor.skipQueue(AsynchronousExecutor.java:344)
at net.minecraftforge.common.util.AsynchronousExecutor.getSkipQueue(AsynchronousExecutor.java:302)
at net.minecraftforge.common.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:12)
at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:144)