Skip to content

Instantly share code, notes, and snippets.

View clayrisser's full-sized avatar
🤓
coding

Clay Risser clayrisser

🤓
coding
View GitHub Profile
@clayrisser
clayrisser / .dockerignore
Created April 28, 2017 13:53
Docker tutorial
node_modules
#
# Script by Leigh Purdie
#
# 1) Install a Ubuntu system, and remove packages according to your
# requirements using synaptic.
# Don't install any new packages that are NOT available from the CD,
# at this stage, unless you include the packages in an 'extras' directory.
#
# 2) dpkg -l > PackageList
# Copy this file to $BASEDIR/source on your build server.
@clayrisser
clayrisser / currentAwardsConfig.js
Last active June 12, 2017 22:59
ProManager Example Awards Config
'use-strict';
module.exports = {
doLogin: {
/**
* Adds 5 coins every time a user logs into their account.
*/
coins: 5,
/**
* Adds the 'some-badge' and 'some-other-badge' the first
@clayrisser
clayrisser / awards.js
Created June 16, 2017 18:03
ProManager Awards
/**
* Awards Configuration
* (app.config.awards)
*
* @notice: If two awards have different deltaTime rules in a single action,
* the first one to reset the lastTime will reset the
* lastTime for both of them
*
* @notice: channelCount gets counted even if deltaTime fails
*
@clayrisser
clayrisser / getH2Content.js
Created September 23, 2017 20:15
Get h2 tag content
var h2Tags = document.getElementsByTagName('h2');
var h2Inner = [];
for (var i = 0; i < h2Tags.length; i++) {
var h2Tag = h2Tags[i];
if (h2Tag.getElementsByTagName('a').length > 0) {
h2Inner.push(h2Tag.getElementsByTagName('a')[0].innerHTML);
} else {
h2Inner.push(h2Tag.innerHTML);
}
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>Document</title>
</head>
<body>
<a onclick="loginGithub()" href="#">Login w/ GitHub</a>
</body>
<script>
alert()
provider "aws" {
region = "us-west-2"
shared_credentials_file = "~/.aws/credentials"
}
resource "aws_iam_user" "user" {
name = "some-new-aws-user"
}
resource "aws_iam_user_policy_attachment" "test-attach" {
function helloWorld() {
console.log('hello world');
}
@clayrisser
clayrisser / Button.js
Last active February 28, 2019 06:00
Styled components Button
import React, { Component } from "react";
import { Button as NativeButton } from "native-base";
import Text from "../Text";
import PropTypes from "prop-types";
export default class Button extends Component {
static propTypes = {
children: PropTypes.node.isRequired,
onPress: PropTypes.func
};