Skip to content

Instantly share code, notes, and snippets.

View rdegges's full-sized avatar

Randall Degges rdegges

View GitHub Profile
@rdegges
rdegges / app.js
Created July 11, 2014 20:20
Stormpath Express Quickstart
var express = require('express');
var stormpath = require('express-stormpath');
var app = express();
app.use(stormpath.init(app, {
apiKeyFile: process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME'] + '/.stormpath/apiKey.properties',
secretKey: 'some_random_long_string_here',
application: 'https://api.stormpath.com/v1/applications/xxx',
}));
@rdegges
rdegges / gist:dd18ce0199b6c875994c
Created June 5, 2015 22:43
things-not-to-do-in-javascript
create a template engine
@rdegges
rdegges / scenario_1.py
Last active September 1, 2015 23:32
Load testing application #1.
# This test is meant to test out Scenario 1: a lot of users are concurrently
# creating accounts and then logging into a web service with Stormpath.
#
# This script will create 1,000 users total before exiting. This script should
# be launched as many concurrent times as you want to emulate production
# traffic.
from uuid import uuid4
from stormpath.client import Client
@rdegges
rdegges / scenario_2.py
Created September 1, 2015 23:42
Load testing application #2.
# This test is meant to test out Scenario 2: users logging into a group
# protected page, refreshing their custom data, and saving it.
#
# This script will run the above operations 1,000 times in a row, and should be
# launched as many concurrent times as you want to emulate production traffic.
from uuid import uuid4
from stormpath.client import Client
STORMPATH_API_KEY_ID = 'xxx'
#!/usr/bin/python
"""
hello-world.py
@author: Randall Degges
@email: rdegges@gmail.com
@date: 11-20-09
This program tests the pycall library and makes sure that you are able to place
#!/usr/bin/python
"""
simple-flood.py
@author: Randall Degges
@email: rdegges@gmail.com
@date: 11-20-09
This program floods the specified phone number.
/*
* test.c
*
* @author: Randall Degges
* @email: rdegges@gmail.com
* @date: 1-7-2009
*
* This example program demonstrates a weird way to reference array elements in C. All
* credit goes to the Stack Overflow 'Strangest language feature' discussion page:
* http://stackoverflow.com/questions/1995113/strangest-language-feature
rdegges@cora:~/Desktop$ tar zxvf pycall-1.2.tar.gz
pycall-1.2/
pycall-1.2/README
pycall-1.2/PKG-INFO
pycall-1.2/setup.py
pycall-1.2/demos/
pycall-1.2/demos/schedule-call.py
pycall-1.2/demos/hello-world.py
pycall-1.2/demos/run-as-user.py
pycall-1.2/demos/variable-passing.py
rdegges@cora:~$ sudo easy_install pycall
Searching for pycall
Best match: pycall 1.2
Adding pycall 1.2 to easy-install.pth file
Using /usr/local/lib/python2.6/dist-packages
Processing dependencies for pycall
Finished processing dependencies for pycall
rdegges@cora:~/Desktop/pycall-1.2$ python
Python 2.6.4 (r264:75706, Nov 2 2009, 14:38:03)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pycall.callfile import *
>>>