I hereby claim:
- I am jnbt on github.
- I am jnbt (https://keybase.io/jnbt) on keybase.
- I have a public key whose fingerprint is BCCE F4A6 1E3A D605 63B0 3FF7 762C C75F 88DB 7BEC
To claim this, I am signing this object:
<% base_url = "http://youdomain.com/" %> | |
<% pages = sitemap.resources.find_all{|p| p.source_file.match(/\.html/) } %> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | |
<% pages.each do |p| %> | |
<url> | |
<loc><%= base_url + p.destination_path.gsub('index.html','') %></loc> | |
<% if priority = p.metadata[:page]['priority'] %> | |
<priority><%= priority %> </priority> | |
<% end %> |
#!/bin/bash | |
# | |
# Fixes MKV files to be more complient to XMBC, PLEX and other media server / players. | |
# Work for OSX. Needs mkvtoolnix (http://www.downloadbestsoft.com/MKVToolNix.html) | |
# | |
##################################################################################### | |
## | |
## PREFERENCES | |
## |
private class FrameQueueWorker<T>{ | |
private List<T> items; | |
private Action<T,int> block; | |
private int i, imax; | |
public FrameQueueWorker(List<T> items, Action<T,int> block){ | |
this.items = items; this.block = block; | |
i = 0; imax = items.Count; | |
} |
// Renders emojis from the emoji-cheat-sheet.com | |
// Requirements: emojify.js (https://github.com/hassankhan/emojify.js) | |
// Usage: | |
// <p data-bind="message.text | emojify | raw"></p> | |
Batman.mixin(Batman.Filters, { | |
emojify: function(content){ | |
if(typeof(content) === "undefined" || content === null) | |
return undefined; | |
return emojify.replace(content); |
// Truncates (HTML) content | |
// Requirements: jquery.truncate (https://github.com/pathable/truncate/blob/master/jquery.truncate.js) | |
// Usage: | |
// <p data-bind="message.content | truncateHTML 200 | raw"></p> | |
Batman.mixin(Batman.Filters, { | |
niceTruncate: function(content, length, stripTags, words, noBreak, ellipsis){ | |
if(typeof(content) === "undefined" || content === null) | |
return undefined; | |
if(length == null) length = Infinity; |
def create(conn, %{"posting" => posting_params}) do | |
posting_params = posting_params | |
|> extract_valid_params | |
|> to_create_params(conn) | |
changeset = Posting.changeset(%Posting{}, posting_params) | |
if changeset.valid? do | |
posting = Repo.insert!(changeset) | |
posting |> Publisher.after_create |
#!/bin/sh | |
set -e | |
MATTERMOST_API="FILL-IN-MATTERMOST-ENDPOINT" | |
MATTERMOST_TOKEN="FILL-IN-INTEGRATION-TOKEN" | |
MATTERMOST_USERNAME="AN-USERNAME" | |
MATTERMOST_ICON="AN-URL-TO-AN-IMAGE" | |
die() { |
I hereby claim:
To claim this, I am signing this object: