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
# Assumptions: | |
# - SSM agent is installed on instance | |
# - Netcat is installed on instance | |
# - Port 1234 is accessible and no other process is listening | |
# Set instance id | |
export INSTANCE_ID="i-123123123" | |
# Shell 1: Start session | |
aws ssm start-session --target $INSTANCE_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
package test; | |
import com.google.common.collect.Lists; | |
import com.google.common.reflect.TypeToken; | |
import org.junit.Test; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.Type; | |
import java.lang.reflect.TypeVariable; | |
import java.util.List; |
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
$attributeValues = array( | |
'color' => array('Red', 'White', 'Blue'), | |
'size' => array(1, 2, 3, 4), | |
'fabric' => array('Cloth', 'Silk') | |
); | |
class Cartesian | |
{ | |
public static function build($set) | |
{ |
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
@ResponseBody | |
@RequestMapping( | |
produces = "application/json", | |
method = RequestMethod.GET, | |
consumes = "application/json", | |
value = "whatever" | |
) | |
@ResponseStatus(HttpStatus.OK) | |
public DeferredResult<SomeDto> get() { | |
... |
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
package com.enterthebatcave; | |
import java.io.IOException; | |
import org.joda.time.Instant; | |
import org.joda.time.ReadableInstant; | |
import com.fasterxml.jackson.core.JsonParser; | |
import com.fasterxml.jackson.core.JsonToken; | |
import com.fasterxml.jackson.databind.DeserializationContext; |
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
<?php | |
$raw = file_get_contents($argv[1]); | |
$rawDenunciationsLines = explode("\n", $raw); | |
$graph = array(); | |
foreach ($rawDenunciationsLines as $rawDenunciationLine) { | |
$explodedLine = explode(':', $rawDenunciationLine); | |
if (count($explodedLine) != 2) { |
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
package com.enterthebatcave; | |
import java.io.BufferedReader; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.*; | |
import java.util.concurrent.LinkedBlockingQueue; | |
public class LiarLiarPureJava { |
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
package com.enterthebatcave; | |
import com.google.common.base.Splitter; | |
import com.google.common.collect.Iterables; | |
import com.google.common.collect.Lists; | |
import com.google.common.collect.Maps; | |
import com.google.common.collect.Sets; | |
import java.io.BufferedReader; | |
import java.io.FileInputStream; |
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
<?php | |
$generatedFilesFolder = __DIR__ . '/generated_files'; | |
if (!file_exists($generatedFilesFolder)) { | |
mkdir($generatedFilesFolder); | |
} | |