Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Steve Griffith prof3ssorSt3v3

🎯
Focusing
Block or report user

Report or block prof3ssorSt3v3

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 ssl-certificate-commands.txt
#This is just a listing of the commands for generating your SSL certificates
#Run these commands one at a time from inside your ~/ssl folder
#Make sure you create your server.csr.cnf and your v3.ext files first inside the same folder
#private key generation
#This will ask you for a passphrase(password) do NOT lose this file or the password
openssl genrsa -des3 -out ~/ssl/rootCA.key 2048
#create root certificate
openssl req -x509 -new -nodes -key ~/ssl/rootCA.key -sha256 -days 1024 -out ~/ssl/rootCA.pem
View sample-tmdb.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Using TheMovieDB</title>
<meta name="viewport" content="width=device-width">
<!-- API version 3 documentation:
https://developers.themoviedb.org/3/search
https://developers.themoviedb.org/3/movies
-->
View pretend-api.js
//The Local API file code
var api = (function(){
var prop1 = 'prop1';
var prop2 = 2;
var prop3 = true;
var prop4 = Date.now();
var prop5 = ['yes', 'no', 'maybe'];
var init: function(){
View online.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>online offline</title>
<style></style>
</head>
<body>
<script>
View property-descriptors.js
/***************************************
Property Descriptors Methods and Usage
Object.defineProperty(obj, propName, {} )
Object.defineProperties(obj, props)
Object.getOwnPropertyNames(obj)
Object.getOwnPropertyDescriptor(obj, prop)
Object.getOwnPropertyDescriptors(obj)
Object.keys(obj) - list of enumerable properties
Object.values(obj) - list of enumerable prop values
View collapsing.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Shrinking Header</title>
<style>
* {
padding: 0;
margin: 0;
View App.js
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
export default class App extends React.Component {
constructor(){
super();
this.state = {
ready: false,
where: {lat:null, lng:null},
error: null
View input-to-object.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Putting User Input into JS Objects</title>
<style>
.formBox{
padding: 0.5rem 2rem;
@prof3ssorSt3v3
prof3ssorSt3v3 / app1.js
Last active Mar 23, 2020
Express JS Routing examples for YouTube video series on Express
View app1.js
//Starter version of the main app.js file
"use strict";
const express = require("express");
const app = express();
const port = process.env.port || 4444;
app.get("/", (req, res) => {
//handle root
});
View index.js
// Local Notifications:
// https://www.npmjs.com/package/de.appplant.cordova.plugin.local-notification/v/0.8.5
// https://github.com/katzer/cordova-plugin-local-notifications/wiki - reference
// https://github.com/katzer/cordova-plugin-local-notifications - beware the ReadMe file. This is v0.9.0-beta
// Installation
// cordova plugin add de.appplant.cordova.plugin.local-notification
//Build (XCode 10 causes build issues for iOS so it needs the --buildFlag)
// cordova emulate ios --target="iPhone-8, 12.0" --buildFlag="-UseModernBuildSystem=0"
You can’t perform that action at this time.