Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am hellstad on github.
  • I am kevincharm (https://keybase.io/kevincharm) on keybase.
  • I have a public key ASABXcIa-0dHMdXEp7DcmVmYhgOipLUfPWrEhKIegl_SFAo

To claim this, I am signing this object:

@kevincharm
kevincharm / _superstate.js
Last active January 20, 2016 05:30
Accessing/passing down parent state (ReactiveDict) in Blaze
/**
* Global helper for applying parent state to current template.
* Usage:
* Invoke superstate(this); in a Template.onCreated callback to inherit parent state.
* @param templateInstance {Object} The current Blaze.View object to pass in.
* @returns {Object} The state object.
*/
superstate = (templateInstance, stateProp) => {
// defaults to Template.instance().state
if (!stateProp) stateProp = 'state';
@kevincharm
kevincharm / letsencrypt-autogen.sh
Last active January 22, 2020 19:40
CentOS 7 Let's Encrypt SSL certs
#!/bin/bash
# Automates letsencrypt SSL cert generation/installation on CentOS 7 w/nginx
# MIT, use at your own risk blabla
[email protected]
DOMAIN_NAME=foo.bar.com
sudo su - root
cd ~
git clone https://github.com/letsencrypt/letsencrypt
@kevincharm
kevincharm / centos-ami.md
Last active August 9, 2024 01:44
AWS CentOS 7 AMI => Setup for root login via SSH

AWS CentOS 7 AMI Setup for mplz

  1. SSH to EC2 then exec sudo visudo then add line centos ALL=(ALL) NOPASSWD:ALL
  2. exec sudo su - root
  3. exec sudo vi /etc/ssh/sshd_config then edit/uncomment line
@kevincharm
kevincharm / meteor-plz.sh
Last active August 29, 2015 14:13
Bash script for deploying Meteor (1.0.3.1) app to CentOS 6 running forever (now using pm2)
#!/bin/bash
# https://gist.github.com/hellstad
# This is a script I use to automate deploying my meteor app from my git repository to my server running:
# CentOS 6 x86_64
# nginx 1.4.7
# node 0.10.33
# forever 0.13.0
# npm 1.4.28