Skip to content

Instantly share code, notes, and snippets.

View a10k's full-sized avatar

Alok Pepakayala a10k

View GitHub Profile
@a10k
a10k / Dockerfile
Last active August 26, 2021 07:12
Local postgress & proxy server as Docker containers
FROM node:erbium-alpine3.14
WORKDIR /usr/src/app
COPY . .
RUN npm install
EXPOSE 80
CMD node index.js
@a10k
a10k / Dockerfile
Last active August 27, 2021 12:37
iridum-docker
FROM node:erbium-alpine3.14
RUN apk update
RUN apk add git
WORKDIR /usr/src/app
COPY . .
RUN npm install
EXPOSE 80
CMD node index.js
@a10k
a10k / _list.js
Last active June 2, 2021 08:11
iridium-plug
router.get("/.list", async (ctx) => {
ctx.body = fs.readdirSync(`${BASE}/.iridium-notebooks/`)
});
// https://observablehq.com/@a10k/preact-setup@921
export default function define(runtime, observer) {
const main = runtime.module();
main.variable(observer()).define(["Render","htm","Comp"], function(Render,htm,Comp)
{
//borrowed from https://observablehq.com/@observablehq/bannertitles
const pageTitle = "Preact Observable Setup";
const title1 = "Preact Observable";
const title2 = "Setup";
@a10k
a10k / upload.html
Created February 16, 2021 06:11
clipboard
<! DOCTYPE html>
<html>
<body>
<form action="http://localhost:8000/UPLOAD" method="post" enctype="multipart/form-data">
<input type="file" name="word" id="word" />
<input type="file" name="template" id="template" />
<input type="submit" value="Upload files" name="submit" />
</form>
</body>
</html>
@a10k
a10k / DUP-svg-transform.pl
Last active January 3, 2017 09:43
DUP SVG Optimization script
my $file = @ARGV[0];
my $text = do {
local $/ = undef;
open my $fh, "<", $file
or die "could not open $file: $!";
<$fh>;
};
#Select both the consecutive duplcate lines on sublime
(?s)(.*)\n\1
<!DOCTYPE html>
<html>
<body>
<script src="https://cdn.firebase.com/js/client/2.4.1/firebase.js"></script>
<script type="text/javascript">
var fb = new Firebase("https://radiant-fire-5095.firebaseio.com");
fb.child('name').on('value',function(d){console.log(d.val())});
fb.set({'name':'alok'});
</script>
hosting map viz
@a10k
a10k / .hostTest
Last active February 10, 2016 14:09
test