Skip to content

Instantly share code, notes, and snippets.

@slice
slice / frame.html
Created May 28, 2013 00:15
A frame for an HTML File.
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body onload='init()'>
</body>
<script>
function init() {
}
@slice
slice / gist:2ad701de36fbb79b2b02
Last active August 29, 2015 14:14
My new PS1!

This is my new $PS1. I designed it myself, and (I will admit it), was a pain to setup, but I did it!

How as this made?

I was trying out powerline-shell when I saw that it was very slow on my system. Although it was easy to setup, it runs a Python script every time to generate a $PS1. It would take 0.5-1.0 seconds to run the script on my system to generate the $PS1, and that was bothering me. (It's great, though!)

Step 0: Pre-requirements

  • Git
  • Bash
  • Computer knowledge
@slice
slice / install.sh
Last active November 11, 2015 21:03
# installs mcpelauncher-linux and its dependencies
PWD=`pwd`
if [[ ! $PWD == *"mcpelauncher-linux"* ]]; then
echo ">> NOTICE: Not running in the correct repository."
if [[ -d mcpelauncher-linux ]]; then
cd mcpelauncher-linux
echo ">> CDed into the repository."
else
@slice
slice / tscdecrypt.cpp
Created April 24, 2016 18:02
TSCDecrypt - Decrypts Cave Story *.tsc files into plain text.
#include <iostream>
#include <fstream>
#include <sstream>
class TSCDecrypt {
public:
std::string decrypt_file(const std::string& file_name) const {
// Read the file into a string.
std::ifstream file(file_name);
std::stringstream stream;
@slice
slice / DUNGEON.BAS
Last active November 23, 2019 19:19
a weird game i made when i was 11
'Dungeon Masters
'In SMILEBasic.
CLEAR
'---
CLS
'---
PRINT "Loading Font..."
@LOAD
SYSBEEP=FALSE
LOAD "BGF0:MYFNT1",FALSE
@slice
slice / c.md
Last active July 28, 2016 21:12
My C code style

my opinionated C coding style

derived from suckless coding style

standard

  • always use -std=c99 -pedantic

comments

@slice
slice / appopener.html
Created October 22, 2016 22:16
More code from 2013.
App Opener- Tidy
<html>
<head>
<title>App Opener | iPhone</title>
</head>
<body style="font-family:Courier;">
<script>
document.title="App Opener | "+brw
brw=navigator.platform
if (brw!=="iPod" && brw!=="iPhone" && brw!=="iPad") {alert("Sorry, but your device is not supported. You are currently using a/n"+brw+".")}
@slice
slice / TextDisable.html
Created October 22, 2016 22:18
EVEN MORE code from 2013. Starting out in JavaScript.
JSExercises
// TextDisable
<html>
<body>
<font face="Courier">
<font size=5>
<p>
TextDisable - HTML+JScript Exercise
@slice
slice / keybase.md
Created February 11, 2017 08:12
Keybase proofs.

Keybase proof

I hereby claim:

  • I am sliceofcode on github.
  • I am sliceofcode (https://keybase.io/sliceofcode) on keybase.
  • I have a public key whose fingerprint is 0AAE 88B3 A492 DCC1 0ABD D8F8 1508 C19D 7436 A26D

To claim this, I am signing this object:

@slice
slice / explore.cc
Created February 20, 2017 22:08
really old code
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <map>
enum Item {
/* Useless stuff */
ITEM_SHOE, ITEM_SHIRT, ITEM_PANTS,