Skip to content

Instantly share code, notes, and snippets.

View kaecy's full-sized avatar
🌄
I'm awake.

Eris kaecy

🌄
I'm awake.
  • Freelancer
  • England
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>dogs slideshow</title>
<link href="style.css" rel="stylesheet" type="text/css">
<script src="slide.js" type="text/javascript"></script>
</head>
<body>
@kaecy
kaecy / entity conv.html
Last active December 20, 2015 11:39
Web app for entity conversion
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="">
<meta name="keywords" content="">
<script src="entity utils.js"></script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="">
<meta name="keywords" content="">
</head>
@kaecy
kaecy / chat.html
Last active December 23, 2021 11:18
simple jax web chat
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>using ajax</title>
<script language="javascript" src="jax.js"></script>
<style language="css">
input, textarea {
font: 10pt courier
}
</style>
@kaecy
kaecy / rus.rb
Last active December 22, 2015 17:39
require_relative 'webc';
require 'uri';
ws = Webclient.new 'codepad.org';
begin
ws.start "/",
URI.encode_www_form(
'code' => IO.read(ARGV[0]),
'lang' => ARGV[1] == "/p" ? "Plain Text" : 'Ruby',
@kaecy
kaecy / slide.js
Last active December 26, 2015 09:39
var projector = new Object();
var Slide = function(path, caption){this.path = path; this.caption = caption;}
// events hook
onload = initialize;
// relative path or absolute - doesn't matter, caption
var slides = [
new Slide('neko/red_scarf.jpg', 'I am very smart'),
new Slide('neko/awakening.jpg', 'Wahhh! I just woke up'),
@kaecy
kaecy / p.html
Last active December 27, 2015 22:49
Push pictures to puush.me through a web browser.
<html>
<body>
<h2>Upload a picture</h2>
<form enctype="multipart/form-data"
action="http://puush.me/api/up" method="post">
Key: <input type="text" name="k">
<input type="file" name="f" accept="image/jpeg,image/png">
<input name="z" value="poop" style="display:none"> <br><br>
<input type="submit">
</form>
@kaecy
kaecy / gist:7707951
Last active December 29, 2015 17:59
static void uploadPic(HttpURLConnection connection, File name) {
String BOUNDARY = "--$hocuspocus";
DataOutputStream output = null;
connection.setRequestProperty(
"Content-Type",
"multipart/form-data; boundary=$hocuspocus"
);
try {
output = new DataOutputStream(connection.getOutputStream());
output.writeBytes(BOUNDARY + "\r\n");
@kaecy
kaecy / loadES.js
Last active December 29, 2015 20:18
Load script files with a function call.
var nil = 1;
function getFirst(elm) {
var firstElm = document.getElementsByTagName(elm)[0];
if (firstElm == undefined)
return nil;
return firstElm;
}
#include <iostream>
#include <algorithm>
#include <array>
int main()
{
std::array<float, 5> numbers = {1.2, 3.4, 3.7, 2.8, 6.9};
std::cout << std::boolalpha;
std::cout << "ascending short: "