Skip to content

Instantly share code, notes, and snippets.

Configuration Options:
verbose <boolean> Default: false
Use verbose output
max_width <unsigned integer> Default: 100
Maximum width of each line
ideal_width <unsigned integer> Default: 80
Ideal width of each line
@polymetric
polymetric / 0 - UNIX Fifth Edition.c
Last active January 14, 2016 18:49
UNIX V5, OpenBSD, Plan 9, FreeBSD, and GNU coreutils implementations of echo.c || Edited by polymetric to add syntax highlighting
main(argc, argv)
int argc;
char *argv[];
{
int i;
argc--;
for(i=1; i<=argc; i++)
printf("%s%c", argv[i], i==argc? '\n': ' ');
}
#!/bin/bash
if [[ $1 == "-d" || $1 == "--decode" ]]
then
base64 -d < $2 > $3
else
base64 < $2 > $3
fi
@polymetric
polymetric / chunky debug log
Created January 4, 2016 22:55
Missing header in region file!
Settings loaded from C:\Users\Polymetric\.chunky\chunky.json
Found Minecraft directory C:\Users\Polymetric\AppData\Roaming\.minecraft
Found latest Minecraft version: C:\Users\Polymetric\AppData\Roaming\.minecraft\versions\1.8.9-OptiFine_HD_U_G9\1.8.9-OptiFine_HD_U_G9.jar
Loading textures from C:\Users\Polymetric\AppData\Roaming\.minecraft\versions\1.8.9-OptiFine_HD_U_G9\1.8.9-OptiFine_HD_U_G9.jar
Failed to load textures from default texture pack (C:\Users\Polymetric\AppData\Roaming\.minecraft\versions\1.8.9-OptiFine_HD_U_G9\1.8.9-OptiFine_HD_U_G9.jar):
grass_path_side
chorus_plant
end_rod
chorus_flower
purpur_pillar
@polymetric
polymetric / gem install twitter ebooks error
Last active January 1, 2016 00:36
gem install twitter ebooks error
$ gem install twitter ebooks
Building native extensions. This could take a while...
ERROR: Error installing twitter_ebooks:
ERROR: Failed to build gem native extension.
/usr/bin/ruby.exe extconf.rb
creating Makefile
make "DESTDIR=" clean
rm -f
@polymetric
polymetric / TestCSPRNG.java
Last active December 20, 2015 17:49
Simulates an environment (typically an OS) that will take input and use it to create randomness
import java.awt.Canvas;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.image.BufferStrategy;
import java.security.MessageDigest;
import java.util.ArrayList;
import java.util.Random;
public class Skew {
public static void main(String[] args) {
byte[] bytes = new byte[1024];
new Random(0).nextBytes(bytes);
boolean[] bools_in = bytesToBools(bytes);
ArrayList<Byte> bools_in_2 = new ArrayList<Byte>();
ArrayList<Byte> bools_out = new ArrayList<Byte>();