Skip to content

Instantly share code, notes, and snippets.

$.getJSON('https://alpha-api.app.net/stream/0/users/@blainsmith/posts', function(res) {
var posts = res.data;
// Do shit with posts
});
@blainsmith
blainsmith / gist:9073174
Created February 18, 2014 15:30
npm publish issue
> npm publish
npm http PUT https://registry.npmjs.org/automatic
npm http 409 https://registry.npmjs.org/automatic
npm http GET https://registry.npmjs.org/automatic
npm http 200 https://registry.npmjs.org/automatic
npm http PUT https://registry.npmjs.org/automatic/-/automatic-0.1.4.tgz/-rev/19-f0df2d448015e2429bc00a492ab7472d
npm http 403 https://registry.npmjs.org/automatic/-/automatic-0.1.4.tgz/-rev/19-f0df2d448015e2429bc00a492ab7472d
npm http PUT https://registry.npmjs.org/automatic/-/automatic-0.1.4.tgz/-rev/19-f0df2d448015e2429bc00a492ab7472d
npm http 400 https://registry.npmjs.org/automatic/-/automatic-0.1.4.tgz/-rev/19-f0df2d448015e2429bc00a492ab7472d
npm ERR! registry error parsing json

Keybase proof

I hereby claim:

  • I am blainsmith on github.
  • I am blainsmith (https://keybase.io/blainsmith) on keybase.
  • I have a public key whose fingerprint is 4100 89EC 0CC5 925C 07CC 6155 9262 E69F 775D F530

To claim this, I am signing this object:

@blainsmith
blainsmith / js-lib-template.js
Last active November 7, 2025 15:37
JavaScript Library Template
(function() {
// This is a template to begin creating a JS libray. Just replace all instances
// of `lib` with whatever variable you want to use for reference.
// Baseline setup
// --------------
// Establish the root object, `window` in the browser, or `exports` on the server.
var root = this;
@blainsmith
blainsmith / dabblet.css
Created January 14, 2015 13:26
CSS Gridlines
/**
* CSS Gridlines
*/
body {
background-color: #000;
}
ul {
margin: 0 auto;
@blainsmith
blainsmith / Book.json
Created February 19, 2015 18:33
LoopBack ACL with $owner
{
"name": "Book",
"base": "PersistedModel",
"idInjection": true,
"properties": {
"title": {
"type": "string",
"required": true
},
"value": {
@blainsmith
blainsmith / interfaces.go
Last active December 12, 2016 15:28
Interface Exmaple
package main
type Dog interface {
Bark() string
Eat(string)
}
type Bulldog struct {
Name string
}

Keybase proof

I hereby claim:

  • I am blainsmith on github.
  • I am blainsmith (https://keybase.io/blainsmith) on keybase.
  • I have a public key whose fingerprint is AE3A 28D6 A9A4 DD3B CC3D B3CC B897 8178 1EA8 681A

To claim this, I am signing this object:

@blainsmith
blainsmith / redis-copy.sh
Created June 3, 2017 00:56
Copy keys from one Redis instance to another
# Set variables accordingly
source_host=ecfoo.amazonaws.com
source_password=foo
source_port=6666
source_db=0
target_host=ecbar.amazonaws.com
target_password=bar
target_port=6777
target_db=0
@blainsmith
blainsmith / pub.c
Last active April 4, 2018 18:06
Go and C Redis Pub/Sub
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <hiredis/hiredis.h>
int main(int argc, char **argv) {
unsigned int j;