This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This file is from an actual react app that would install the library outlined in the rest of these files | |
import React from 'react' | |
import { SafeAreaView, StyleSheet, View } from 'react-native' | |
import RichTextEditor from 'react-native-rich-text-editor' | |
const styles = StyleSheet.create({ | |
body: { | |
flex: 1, | |
}, | |
inputContainer: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { graphql } from 'react-apollo'; | |
import { get } from 'lodash'; | |
export default ({ query, options = () => {}, props = {}, skip = false }) => | |
graphql(query, { | |
options: parentProps => ({ | |
fetchPolicy: 'cache-and-network', | |
...options(parentProps), | |
}), | |
props, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
let args: Vec<String> = std::env::args().collect(); | |
let input = match args[1].parse::<i32>() { | |
Ok(num) => num, | |
Err(error) => panic!("The number provided is too large for an i32: {:?}", error) | |
}; | |
println!("The sum of all digits is {}", sum_digits(&input)); | |
} | |
fn sum_digits(num: &i32) -> i32 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const taskData = {} | |
formatAppointment({ task: [], assignment: undefined }) | |
function formatAppointment({ task, assignment }) { | |
const [ taskData ] = task; | |
// Error shows here due to the assignment property being a non-iterable value | |
const [ assignmentData ] = assignment; | |
return { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWS = require('aws-sdk'); | |
const https = require('https'); | |
const crypto = require('crypto'); | |
//Set up https agent for AWS | |
const agent = new https.Agent({ | |
rejectUnauthorized: true, | |
keepAlive: true, | |
ciphers: 'ALL', | |
secureProtocol: 'TLSv1_method', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Loads credstah credentials from a file | |
# Pre-req: | |
# Need to have credstash installed and setup from: https://github.com/fugue/credstash | |
# Tables for credentials need to be named `credentials-<stage>` | |
# | |
# Stage defaults to 'development' | |
# | |
# File Format Spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function myFunction() { | |
Logger.log('Getting your default calendar'); | |
var cal = CalendarApp.getDefaultCalendar(); | |
Logger.log(cal.getId()); | |
Logger.log(cal.getName()); | |
Logger.log('________________________________________') | |
Logger.log('Getting all calendars'); | |
var cals = CalendarApp.getAllCalendars(); | |
cals.forEach(function(cal) { |