This file contains hidden or 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 com.fasterxml.jackson.core.JsonProcessingException; | |
| import com.fasterxml.jackson.databind.ObjectMapper; | |
| import org.apache.commons.codec.binary.Base64; | |
| import java.io.IOException; | |
| import java.net.URI; | |
| import java.net.http.HttpClient; | |
| import java.net.http.HttpRequest; | |
| import java.net.http.HttpResponse; | |
| import java.net.http.HttpResponse.BodyHandlers; |
This file contains hidden or 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
| package lol.gilliard.conferencecalls; | |
| import com.twilio.twiml.VoiceResponse; | |
| import com.twilio.twiml.voice.Conference; | |
| import com.twilio.twiml.voice.Dial; | |
| import com.twilio.twiml.voice.Say; | |
| import org.springframework.stereotype.Controller; | |
| import org.springframework.web.bind.annotation.PostMapping; | |
| import org.springframework.web.bind.annotation.ResponseBody; |
This file contains hidden or 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
| { | |
| "description": "Doomsday by SMS", | |
| "states": [ | |
| { | |
| "name": "Trigger", | |
| "type": "InitialState", | |
| "properties": { | |
| "offset": { | |
| "x": 0, | |
| "y": 0 |
This file contains hidden or 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
| package lol.gilliard; | |
| import com.amdelamar.jotp.OTP; | |
| import com.amdelamar.jotp.type.Type; | |
| import java.io.IOException; | |
| import java.security.InvalidKeyException; | |
| import java.security.NoSuchAlgorithmException; | |
| // This code uses Austin Delamar's JOTP: https://github.com/amdelamar/jotp |
This file contains hidden or 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
| package prizedraw; | |
| import com.twilio.Twilio; | |
| import com.twilio.base.ResourceSet; | |
| import com.twilio.rest.api.v2010.account.Message; | |
| import com.twilio.type.PhoneNumber; | |
| import org.joda.time.DateTime; | |
| import java.util.Collections; | |
| import java.util.stream.Collectors; |
This file contains hidden or 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
| public class GolExample { | |
| public static void main(String[] args) { | |
| int [][] generation = { | |
| {0,0,0,0,0,0,0,0,0,0}, | |
| {0,0,0,0,0,0,0,0,0,0}, | |
| {0,0,0,0,0,0,0,0,0,0}, | |
| {0,0,0,0,0,0,0,0,0,0}, | |
| {0,0,0,0,0,0,0,0,0,0}, |
This file contains hidden or 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
| // 1. Sign up -> twilio.com/try-twilio | |
| // 2. Get a number -> twilio.com/console | |
| // 3. Add the Twilio Java library | |
| // --> twilio.com/docs/libraries/java | |
| import com.twilio.Twilio; | |
| import com.twilio.rest.api.v2010.account.Call; | |
| import com.twilio.type.PhoneNumber; | |
| import java.net.URI; |
This file contains hidden or 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
| // 1. Sign up -> twilio.com/try-twilio | |
| // 2. Get a number -> twilio.com/console | |
| // 3. Add the Twilio Java library | |
| // --> twilio.com/docs/libraries/java | |
| import com.twilio.Twilio; | |
| import com.twilio.rest.api.v2010.account.Message; | |
| import com.twilio.type.PhoneNumber; | |
| class SendSms { |
This file contains hidden or 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 json | |
| import urllib2 | |
| import sys | |
| try: | |
| input = json.loads(''.join(sys.stdin.readlines()))['body'] | |
| except: | |
| input="" | |
| if input == "": |
This file contains hidden or 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
| public void handleRequest(ScrapeReq input) throws Exception { | |
| FlowFuture<ScrapeResp> scrapes = currentFlow().invokeFunction("./scraper", input, ScrapeResp.class); | |
| scrapes.thenCompose(resp -> { | |
| List<ScrapeResp.ScrapeResult> results = resp.result; | |
| List<FlowFuture<?>> pendingTasks = results | |
| .stream() |