Skip to content

Instantly share code, notes, and snippets.

View bnvk's full-sized avatar

Warm Ashes bnvk

  • Earth
View GitHub Profile
import email
import json
import sys
import random
from matrix_client.api import MatrixHttpApi
html_template = (
"<b>From</b>: %(from)s\n"
"<b>To</b>: %(to)s\n"
### Keybase proof
I hereby claim:
* I am bnvk on github.
* I am bnvk (https://keybase.io/bnvk) on keybase.
* I have a public key whose fingerprint is 01AE EADB 9EED 1B5B 4280 E5B6 C4CA A23B 0F8C 68B2
To claim this, I am signing this object:
@bnvk
bnvk / gist:c5e158cb4d9f0e54edda
Created June 29, 2014 14:49
IndieMark 1 (author h-card)
<div class="vcard h-card">
<img class="u-photo photo" src="https://brennannovak.com/uploads/sites/1/Me_Train_Tracks_200.jpg">
<p class="p-note">
<a rel="me" href="https://brennannovak.com" class="u-url url p-name fn">
<span class="p-given-name given-name">Brennan</span>
<span class="p-family-name family-name">Novak</span>
</a>
<span class="p-job-title">internet builder</span>
<span class="p-job-title">co-founder</span>
<span class="p-job-title">software engineer</span>
@bnvk
bnvk / indie-store-project-snippet-rough
Created March 17, 2014 17:41
IndieStore Project Snippet (rough)
{
"description": "A modern, fast web-mail client with user-friendly encryption and privacy features",
"license_url": "https://raw.github.com/pagekite/Mailpile/master/LICENSE-2.0.txt",
"logo": "mailpile.png",
"notes": "",
"privacy_url": "",
"source_url": "https://github.com/pagekite/mailpile",
"name": "Mailpile",
"tos_url": "",
"url": "https://mailpile.is",
@bnvk
bnvk / cs3_panorama.html
Created May 4, 2013 22:11
Nifty CSS3 + JS panorama code by @barnabywalters
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>CSS3 Panorama by Barnaby Walters</title>
<style type="text/css">
.panorama-container {
width: 750px;
}
<?php
class ServiceHelper {
// @text is the full tweet text
// @shortCode is the code part of the shortlink, like nXXX0
public function shortenForTwitter($text, $shortCode=FALSE, $shortDomain=FALSE) {
$placeholders = array();
$rawTweet = $text;
@bnvk
bnvk / more-mute-regex.md
Created July 24, 2012 05:29 — forked from jimmynotjim/more-mute-regex.md
Tweetbot can use regular expressions to mute tweets in your timeline and mentions.

##Simply annoying Tweets

Annoyingly extended words (4+ of the same letter in a phrase): OOOOHHHHMMMMYYYYGGGGOOOODDDD

([a-z])/1{4}

Tweet w/ just a single hashtag: #omgthissucks

^ *#[^ ]+$
@bnvk
bnvk / LICENSE.txt
Created November 8, 2011 05:06 — forked from aemkei/LICENSE.txt
Latitude Longitude Distance - 140byt.es
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@bnvk
bnvk / LICENSE.txt
Created November 8, 2011 05:06 — forked from OiNutter/LICENSE.txt
Credit Card Validation similar to the Luhn Algorithm
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Will McKenzie<www.oinutter.co.uk>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
I just encountered a weird little quirk of PHP that I spent awhile trying to resolve, so I'm posting this as a Google search turns up nothing.
When including a .php file in the midst of an html/view file using the include() function:
<?= include('myfile.php') ?>
Was producing a number '1' located after the end of include. The issue turns out to be a bug / feature or using short tags:
<?=