Skip to content

Instantly share code, notes, and snippets.

View kshreve's full-sized avatar
🏠
Working from home

Kevin Shreve kshreve

🏠
Working from home
View GitHub Profile
@kshreve
kshreve / sslNginx.sh
Last active May 16, 2018 12:03 — forked from jessedearing/gist:2351836
Create self-signed SSL certificate for Nginx
#!/bin/bash
echo "Generating an SSL private key to sign your certificate..."
openssl genrsa -des3 -out myssl.key 1024
echo "Generating a Certificate Signing Request..."
openssl req -new -key myssl.key -out myssl.csr
echo "Removing passphrase from key (for nginx)..."
cp myssl.key myssl.key.org
openssl rsa -in myssl.key.org -out myssl.key
### Keybase proof
I hereby claim:
* I am kshreve on github.
* I am kshreve (https://keybase.io/kshreve) on keybase.
* I have a public key ASCAywEBEjSfsBh-TLYK-9k1AbTkScgvf9sOkB4YooGeIwo
To claim this, I am signing this object:
@kshreve
kshreve / gist:b42ea30bdd17a64af19ddd7824681500
Created December 27, 2017 14:12
Pulling code from a PR. Add this to your Git Config
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "upstream"]
url = https://github.com/OrgName/ProjectName.git
fetch = +refs/heads/*:refs/remotes/upstream/*
Change your upstream config to look like this, with the added bottom line
[remote "upstream"]
url = https://github.com/OrgName/ProjectName.git
@kshreve
kshreve / infinite-scroll.js
Created February 20, 2015 18:18
infinite-scroll.js
(function() {
'use strict';
angular.module('app').directive('infiniteScroll', ['$window', function(window) {
return {
restrict: 'A',
link: function(scope, element, attributes) {
angular.element(window).bind('scroll', function () {
var container = window.document.body;
if((window.innerHeight + window.scrollY) >= window.document.body.offsetHeight) {
@kshreve
kshreve / select-box.js
Last active August 29, 2015 14:15
select-box.js
(function() {
'use strict';
angular.module('app').directive('selectBox', ['$timeout', function(timeout) {
return {
restrict: 'A',
replace: true,
scope: {
tabindex: '@',
placeholder: '@',
@kshreve
kshreve / carousel.js
Last active August 29, 2015 14:14
AngularJS - Carousel - Source http://jsbin.com/zahime