Skip to content

Instantly share code, notes, and snippets.

😀
Coding with Rust

Stephen Blum stephenlb

😀
Coding with Rust
Block or report user

Report or block stephenlb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View js-date.js
/* ----------------------------------------------------------------------------
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.'
);
View nodejuice.js
// 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
View vimrc
set t_Co=256
set background=dark
"colorscheme moria
colorscheme darkspectrum
syntax enable
set hlsearch
set et
set sw=4
set smarttab
set autoindent
View .screenrc
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 Aug 3, 2011
PubNub SFJS JavaScript Meetup August 2nd 2011 at PeopleBrowsr
View gist:1121639
@stephenlb
stephenlb / macvim-install.sh
Created Feb 18, 2012
MacVim Terminal Installation
View macvim-install.sh
## 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 Jul 24, 2012
Use PubNub Objective-C iOS API with Two API Keys
View gist:3167593
// 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 Oct 13, 2015
PubNub - WebRTC Demo Links
View gist:4163074
@stephenlb
stephenlb / history.md
Last active Oct 3, 2016
PubNub History API V2
View history.md

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 Mar 31, 2018
PubNub API Key Management via REST
View gist:4481195

PubNub API Key Management via REST

Step 1: Authenticate

POST https://admin.pubnub.com/api/me
email=foo@bar.com
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.

You can’t perform that action at this time.