Skip to content

Instantly share code, notes, and snippets.

Avatar
🤷‍♂️

Brad Daily bradleyboy

🤷‍♂️
View GitHub Profile
View Chatpen.markdown

Chatpen

Multiuser chat built with React and Firebase. Note that this is on the Firebase free plan, so if more than 50 users are on it things may go south.

A Pen by Brad Daily on CodePen.

License.

@bradleyboy
bradleyboy / create_koken.sh
Last active April 3, 2020 07:04
Docker script for Koken
View create_koken.sh
#!/bin/bash
echo ""
# Root check
if [[ "$UID" -ne 0 ]]; then
echo "!! This script requires root privileges. sudo ./create_koken.sh"
echo ""
exit
fi
View gist:11301568
<!-- Load recent archive albums -->
<div class="section-title item_meta">RECENT ALBUMS FROM THE ARCHIVE</div>
<koken:variable name="count" value="0" />
<koken:load source="albums" filter:flat="true" filter:types="standard" limit="2">
<!-- Loop over each album -->
<koken:loop>
<article>
<div class="article-inner">
<koken:link>
<koken:img />
@bradleyboy
bradleyboy / gist:6700472
Last active December 23, 2015 21:59 — forked from jackydra/gist:6697057
View gist:6700472
<koken:parent>
<ul class="sidebar-meta">
<li class="sidebar-meta-head"><p>{{ album.title }}</p></li>
<li class="sidebar-meta-head">
<p>Work
{{ _parent.album.context.position }}/{{ _parent.album.context.position }}
</p>
</li>
</koken:parent>
View gist:6676077
<koken:if true="settings.albums_index_show_title">
<h4>
<koken:load style="margin-left: 0.2em;">
{{ album.title }} <!-- Prints SET title -->
</koken:load>
</h4>
<p>Work
<koken:load>
View gist:6676068
<koken:if true="settings.albums_index_show_title">
<h4>
<koken:load style="margin-left: 0.2em;">
{{ album.title }} <!-- Prints SET title -->
</koken:load>
</h4>
<p>Work
<koken:load>
@bradleyboy
bradleyboy / nginx.conf
Last active March 22, 2022 19:46
nginx rewrite setup for Koken
View nginx.conf
# Enable gzip. Highly recommending for best peformance
gzip on;
gzip_comp_level 6;
gzip_types text/html text/css text/javascript application/json application/javascript application/x-javascript;
# By default, do not set expire headers
expires 0;
# Set expires header for console CSS and JS.
# These files are timestamped with each new release, so it is safe to cache them agressively.
View Koken Topics - Non-functional
<koken:topics>
<koken:loop>
<koken:load source="album" filter:id="{{ album.id }}">
<koken:loop>
<koken:img />
</koken:loop>
</koken:load>
</koken:loop>
</koken:topics>
View Koken Topics - Non-functional
<koken:topics>
<koken:loop>
<koken:load source="album" filter:id="album.id">
<koken:loop>
<koken: img />
</koken:loop>
</koken:load>
</koken:loop>
</koken:topics>