Skip to content

Instantly share code, notes, and snippets.

View stephenlb's full-sized avatar
😀
Coding with Rust

Stephen Blum stephenlb

😀
Coding with Rust
View GitHub Profile
/* ----------------------------------------------------------------------------
JavaScript Easy Date Function Similar to PHP but with JS Function Names minus 'get'
"Today is Thursday the 7th in January 2010. The time is 5:28pm and 46 Seconds."
jsdate(
'Today is {Day} the {Date}{DateSuffix} in {Month} {FullYear}. ' +
'The time is {HalfHours}:{Minutes}{AMPM} and {Seconds} Seconds.'
);
// config file: nodejuice.js
// Example StaticMatic configuration.
// -> http://localhost:3010
exports.sidekick = {
host : null, // Leave 'null' to listen on all hosts.
port : 3010, // access your server from this port.
fetch : { // point to your web server.
host : 'localhost',
port : 3000
set t_Co=256
set background=dark
"colorscheme moria
colorscheme darkspectrum
syntax enable
set hlsearch
set et
set sw=4
set smarttab
set autoindent
startup_message off
vbell off
msgwait 1
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H ]%{g}[%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m/%d %{W}%c %{g}]'
# terminfo and termcap for nice 256 color terminal
# allow bold colors - necessary for some reason
attrcolor b ".I"
@stephenlb
stephenlb / gist:1121639
Created August 3, 2011 00:46
PubNub SFJS JavaScript Meetup August 2nd 2011 at PeopleBrowsr
@stephenlb
stephenlb / macvim-install.sh
Created February 18, 2012 07:27
MacVim Terminal Installation
## MacVim Good Terminal Only Installation Guide
## http://www.pubnub.com/
## http://twitter.com/pubnub
## USAGE - Copy+Paste this One-liner:
##
## bash <(curl https://raw.github.com/gist/1858026/macvim-install.sh)
##
## OR - Download this file and execute
@stephenlb
stephenlb / gist:3167593
Created July 24, 2012 02:16
Use PubNub Objective-C iOS API with Two API Keys
// Use PubNub Objective-C iOS API with Two API Keys
// Combination of PubNub Pulse an Galaxy
// JOIN PUBNUB PULSE WITH GALAXY
// PUBNUB PULSE
pubnub_pulse = [[CEPubnub alloc]
publishKey: @"PULSE_PUBLISH_KEY"
subscribeKey: @"PULSE_SUBSCRIBE_KEY"
secretKey: @"PULSE_SECRET_KEY"
sslOn: NO
@stephenlb
stephenlb / gist:4163074
Last active October 13, 2015 07:48
PubNub - WebRTC Demo Links
@stephenlb
stephenlb / history.md
Last active October 3, 2016 20:29
PubNub History API V2

PubNub History API V2

/v2/history/sub-key/<sub-key>/channel/<channel>?URL_PARAMETERS
URL Parameters:
start (time token): Beginning of a timeline slice (exclusive)
@stephenlb
stephenlb / gist:4481195
Last active March 31, 2018 03:39
PubNub API Key Management via REST

PubNub API Key Management via REST

Step 1: Authenticate

POST https://admin.pubnub.com/api/me
[email protected]
password=password

Step 1 will return authentication details including a TOKEN and APP_ID. You will need both of these values for all following requests.