Skip to content

Instantly share code, notes, and snippets.

Avatar

Randall Degges rdegges

View GitHub Profile
View test.js
{
ip: '8.8.8.8',
location: {
country: 'US',
region: 'California',
city: 'Mountain View',
lat: 37.40599,
lng: -122.078514,
postalCode: '94043',
timezone: '-07:00',
@rdegges
rdegges / okta-server.js
Created Aug 21, 2019
Showcase an Okta Node Server #okta #javascript
View okta-server.js
const express = require("express");
const okta = require("okta");
const app = express();
app.use(okta());
@rdegges
rdegges / test.js
Created May 20, 2019
This example shows you how to do X #okta #mfa
View test.js
import "hi";
test.call();
@rdegges
rdegges / list-users.js
Created Apr 17, 2019
List Users in Okta Using Node #okta #mfa
View list-users.js
client.listUsers(u => {
console.log(user);
});
@rdegges
rdegges / halloween.sh
Created Oct 20, 2017
Spooky Halloween Prompt
View halloween.sh
export PS1='
👻 %{$purple%}%n%{$reset_color%} in %{$limegreen%}%~%{$reset_color%}$(ruby_prompt_info " with%{$fg[red]%} " v g "%{$reset_color%}")$vcs_info_msg_0_%{$orange%} λ%{$reset_color%} '
View sample-output.json
{
"catchAll": "false",
"disposable": "false",
"dns": "OK",
"emailAddress": "r@rdegges.com",
"free": "false",
"mxs": [ "mail.protonmail.ch" ],
"smtp": "OK",
"validFormat": "OK"
}
@rdegges
rdegges / index.html
Created Jul 21, 2017
Crypto Compare styling.
View index.html
<tbody>
<tr v-for="coin in coins">
<td>{{ coin.rank }}</td>
<td><img v-bind:src="getCoinImage(coin.symbol)"> {{ coin.name }}</td>
<td>{{ coin.symbol }}</td>
<td>{{ coin.price_usd | currency }}</td>
<td v-bind:style="getColor(coin.percent_change_1h)">
<span v-if="coin.percent_change_1h > 0">+</span>{{ coin.percent_change_1h }}%
</td>
<td v-bind:style="getColor(coin.percent_change_24h)">
@rdegges
rdegges / app.js
Created Jul 21, 2017
Crypt Compare getColor
View app.js
/**
* Return a CSS color (either red or green) depending on whether or
* not the value passed in is negative or positive.
*/
getColor: (num) => {
return num > 0 ? "color:green;" : "color:red;";
}
@rdegges
rdegges / index.html
Created Jul 21, 2017
Crypto Compare table.
View index.html
<table class="table table-hover">
<thead>
<tr>
<td>Rank</td>
<td>Name</td>
<td>Symbol</td>
<td>Price (USD)</td>
<td>1H</td>
<td>1D</td>
<td>1W</td>
@rdegges
rdegges / app.js
Created Jul 21, 2017
Crypto Compare setInterval
View app.js
/**
* Once the page has been loaded and all of our app stuff is working, we'll
* start polling for new cryptocurrency data every minute.
*
*/
setInterval(() => {
app.getCoins();
}, UPDATE_INTERVAL);