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
#!/usr/bin/bash | |
# This script will take a snapshot of the database | |
# It will then gzip it | |
# It will save it in the 'storage' directory | |
# it will delete any old db snapshots > 7 days. | |
echo "===== Starting Snapshot ====" | |
formatted_date=`date +'%m%d%Y'` | |
formatted_time=`date +'%I%M%S'` |
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
// An example mutation using react & gql | |
import gql from 'graphql-tag' | |
export default gql` | |
mutation CREATE_CLIENT($name: String!) { | |
createClient(name: $name) { | |
client { | |
id | |
} |
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
# graphql_example.graphql | |
# user query | |
query MY_USER_QUERY($id: ID!) { | |
user(id: $id) { | |
id | |
policy { | |
isAdmin | |
isCreator | |
... |
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/sh | |
current=$(pwd) | |
formatter_file=".formatter.exs" | |
echo $current | |
if [ -e $current/"$formatter_file" ]; | |
then | |
mix format | |
echo "Formatting Complete" |
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
//########### Cool guy statements ########## | |
//1.Declare 2 variables named {num1} and {num2} that are of type number. (Give them numerical values). | |
var num1 = 2; | |
var num2 = 5; | |
//2.Add num1 and num2 and display the result in the console. store the sum in a new variable called num3; |
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
Scanner scan = new Scanner(System.in); | |
boolean userCont; | |
String userAns; | |
do { | |
System.out.print("Enter your min value: "); | |
int userLow = scan.nextInt(); | |
System.out.print("Enter your high value: "); | |
int userHigh = scan.nextInt(); | |
System.out.println("number | squared | cubed"); |