Instantly share code, notes, and snippets.

View slack-file-delete.rb
require 'net/http'
require 'json'
require 'uri'
@token = ''
def list_files
ts_to = ( - 30 * 24 * 60 * 60).to_i # 30 days ago
params = {
token: @token,
View ES6 Class Pattern Syntax.jsx
//these bring the methods of the named classes into this class for use
import React, {Component, PropTypes} from 'react';
import {withRouter} from 'react-router';
//Classes are the way we write prototypes now they are exactly the same but differnt syntax
class Filters extends Component {
//each class has a constructor the super binds props to the function class name
//so you can use this.props
constructor(props) {
View calculations.php
//Starting Balance on Card, also know as the principal
$principal = 1980;
// The yearly interest rate % expressed as a decicmal, 18% in this case
$yearlyInterestRate = 0.18;
//The minimum payment % expressed as a decimal, 3% in this case
$minimumPaymentRate = 0.03;
// Calculate the interest rate charged monthly
$monthlyInterestRate = $yearlyInterestRate / 12.00;
//Create a months counter