Skip to content

Instantly share code, notes, and snippets.

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDK5drsxKGiD67bi3ZyiwnsXjuQ7/JzsQk+0yBxeSysoRU6lOSx9HV3Fnub1WBeLDZzJJkiVXk6+oUvcJwS/24EdlbMS4YVO0sHBqh/gp7MjMnwIH454V8ethYRVfgl8YpNbMb2NmTVNXmRX3yxPgQ6AP3Q7lWR9NqEebzc7ojdEK0hlRZG54DIupPiTgle8Vj9YpTKko9A5BLudEZ0aJPv/txWwFGjsOWNZ4BgnphQsk3rWHdAX/CJT4nV/YGjr16gM/rb0afgYO9xzQtqsYOl/10Lk/e4HoAOXFx4XZWuJHoZ/496c+9HOhBr8sYaLs/pIwKHf0cxkTiTjXOWdf+3 janos@kraken
try (FileInputStream fis = new FileInputStream(path);
ObjectInputStream ois = new ObjectInputStream(fis)) {
Contact[] loaded = (Contact[]) ois.readObject();
System.out.println(Arrays.toString(loaded));
}
@janosgyerik
janosgyerik / print-cookie.png
Created April 19, 2020 14:54
Print document.cookie XSS
We can't make this file beautiful and searchable because it's too large.
DOCUMENT ID,CRFN,COLLATERAL,# of PAGES,REEL-PAGE,EXPIRATION DATE,DOC TYPE,FILE NUMBER,ASSESSMENT DATE,DOC DATE,RECORDED/FILED,SLID#,DOC AMOUNT,BOROUGH,% TRANSFERRED,RPTT#,MAP SEQUENCE#,MESSAGE,PARTY1-NAME,PARTY1-ADDRESS1,PARTY1-ADDRESS2,PARTY1-CITY,PARTY1-STATE,PARTY1-ZIP,PARTY1-COUNTRY,PARTY2-NAME,PARTY2-ADDRESS1,PARTY2-ADDRESS2,PARTY2-CITY,PARTY2-STATE,PARTY2-ZIP,PARTY2-COUNTRY,PARTY3-NAME,PARTY3-ADDRESS1,PARTY3-ADDRESS2,PARTY3-CITY,PARTY3-STATE,PARTY3-ZIP,PARTY3-COUNTRY,PARCELS-BOROUGH,PARCELS-BLOCK,PARCELS-LOT,PARCELS-PARTIAL,PARCELS-PROPERTY TYPE,PARCELS-EASEMENT,PARCELS-AIR RIGHTS,PARCELS-SUBTERRANEAN RIGHTS,PARCELS-PROPERTY ADDRESS,PARCELS-UNIT,PARCELS-REMARKS,REFERENCES-CRFN,REFERENCES-DOCUMENT ID,REFERENCES-BOROUGH,REFERENCES-YEAR,REFERENCES-REEL,REFERENCES-PAGE,REFERENCES-FILE NBR
2018021300661001,2020000093530,N/A,4,N/A-N/A,N/A,DEED,N/A,N/A,2/14/2018,3/12/2020 11:38:26 AM,N/A,$0.00,MANHATTAN,50%,N/A,N/A,N/A,404 NY LLC,C/O:ARGYROPOULOS & ASSOCIATES,"3108 BROADWAY,STE 202",LONG ISLAND CITY,NY,11106-2
import java.util.ArrayList;
import java.util.List;
public class MergeSort {
public static <T extends Comparable<T>> void sort(List<T> list) {
sort(list, 0, list.size());
}
private static <T extends Comparable<T>> void sort(List<T> list, int start, int end) {
if (end - start < 2) return;

title

Lorem ipsum dolor sid amet.

section

Lorem ipsum dolor sid amet.

sub-section

provider "google" {
region = "${var.region}"
project = "${var.project_name}"
credentials = "${file("${var.credentials_file_path}")}"
}
resource "google_compute_instance" "docker" {
count = 1
google_compute_instance.docker[0]: Creating...
google_compute_instance.docker[0]: Still creating... [10s elapsed]
google_compute_instance.docker[0]: Still creating... [20s elapsed]
google_compute_instance.docker[0]: Provisioning with 'remote-exec'...


Error: Failed to parse ssh private key: ssh: cannot decode encrypted private keys
@janosgyerik
janosgyerik / 732-my-calendar-3.java
Created March 11, 2019 19:54
732. My Calendar III
// solution to: 732. My Calendar III https://leetcode.com/problems/my-calendar-iii/
class MyCalendarThree {
private final Comparator<Pos> comparator = Comparator.<Pos>comparingInt(p -> p.pos)
.thenComparing((p1, p2) -> {
if (p1.mark == p2.mark) return Integer.compare(p1.hashCode(), p2.hashCode());
if (p1.mark == Mark.END) return -1;
return 1;
});
private final SortedSet<Pos> marks = new TreeSet<>(comparator);

Create Amazon EC2 Instance

  • Ensure that inbound MySQL port 3306 is opened
  • chmod 700 "keypair-name.pem"

Install MySQL

To install MySQL, run the following command from a terminal prompt:

  • sudo apt-get install mysql-server