Skip to content

Instantly share code, notes, and snippets.

View brockers's full-sized avatar

Bobby Rockers brockers

View GitHub Profile
@paragonie-scott
paragonie-scott / jose-security.md
Last active June 12, 2020 11:32
Suggestions for a Secure JOSE Alternative (or Protocol Upgrade)

Changes to JOSE that will prevent insecurity

Deletions

JWS and JWE

Drop the alg header

Neither JOSE users nor JOSE library designers should be required to understand cryptography primitives. At a lower level, this can lead to badly implemented primitives. On a higher level, this can lead to reasoning by lego.

# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@XVilka
XVilka / TrueColour.md
Last active September 19, 2024 04:17
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@ricco386
ricco386 / btsync
Created April 26, 2013 13:45
Linux Daemon for BitTorrent Sync. This shell script takes care of starting and stopping btsync. Written in Fedora, can be used in /etc/init.d/ to start btsync at boot.
#!/bin/bash
#
# btsync This shell script takes care of starting and stopping btsync
#
# chkconfig: 2345 20 80
# description: btsync is BitTorrent Sync program which allows you \
# to synchronize directories between computers.
# processname: btsync
# Source function library.
@tbranyen
tbranyen / couchdb-parser.js
Created May 16, 2012 19:46
Miso Project - Dataset: CouchDB Parser
// Underscore utility
var _ = require("underscore");
// Miso library
var Miso = require("miso.dataset");
Miso.Parsers.Couchdb = function(data, options) {};
_.extend(Miso.Parsers.Couchdb.prototype, {
parse: function(rows) {
var columns, valueIsObject;
@tbranyen
tbranyen / couchdb-importer.js
Created May 16, 2012 19:45
Miso Project - Dataset: CouchDB Importer
// Underscore utility
var _ = require("underscore");
// Miso library
var Miso = require("miso.dataset");
// Nano library
var nano = require("nano");
/*
* The Couchdb importer is responsible for fetching data from a CouchDB
* database.
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@tomerd
tomerd / gauge.js
Last active April 21, 2024 21:08
google style gauges using javascript d3.js
function Gauge(placeholderName, configuration)
{
this.placeholderName = placeholderName;
var self = this; // for internal d3 functions
this.configure = function(configuration)
{
this.config = configuration;
@fdmanana
fdmanana / gist:832610
Created February 17, 2011 20:27
The CouchDB replicator database

1. Introduction to the replicator database

A database where you PUT/POST documents to trigger replications and you DELETE to cancel ongoing replications. These documents have exactly the same content as the JSON objects we used to POST to /_replicate/ (fields "source", "target", "create_target", "continuous", "doc_ids", "filter", "query_params".

Replication documents can have a user defined "_id". Design documents (and _local documents) added to the replicator database are ignored.

The default name of this database is _replicator. The name can be changed in the .ini configuration, section [replicator], parameter db.

2. Basics

@tbtlr
tbtlr / get_barcode_from_image.js
Created June 1, 2010 19:33
Barcode recognition with JavaScript - Demo: http://bit.ly/djvUoy
/*
* Copyright (c) 2010 Tobias Schneider
* This script is freely distributable under the terms of the MIT license.
*/
(function(){
var UPC_SET = {
"3211": '0',
"2221": '1',
"2122": '2',