Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / 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 / 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 / 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() {
}