Skip to content

Instantly share code, notes, and snippets.

View EcutDavid's full-sized avatar
📚

David Guan EcutDavid

📚
View GitHub Profile
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
body {
padding-top: 50px;
text-align: center;
font-size: 2.5em;
}
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Demo</title>
<style>
body {
padding-top: 50px;
text-align: center;
font-size: 2.5em;
}
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Demo</title>
</head>
<body>
<script src="https://sdk.canva.com/designbutton/v2/api.js"></script>
<script>
Canva.DesignButton.initialize({
// Please replace the apiKey with yours :)
Goal Result
Run 1300 KM in total #PhysicalStrength 691 KM
Practice boxing 1 hour per week #PhysicalStrength only a few weeks
Run Marathon once #PhysicalStrength
Practice music instrument 6 hours per week #Hobbies only a few weeks
Make 4 Youtube videos #Hobbies
Spend at least 10 hours every week on algorithms study & practice #Skills only 2 hours per week
Finish 3 online courses & writing a blog for each #Skills only 1 without blog produced
Keep getting out of the comfort zone #Work give myself a 50% ✅ mark
Read the source code of Chromium and writing some blogs on it #Work
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Voice Notes</title>
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
/>
const path = require("path");
const AWS = require("aws-sdk");
const fs = require("fs");
const fsPromises = fs.promises;
const polly = new AWS.Polly();
const s3 = new AWS.S3();
const bucketName = "polly-voice-notes";
const notesDir = "notes";
const manifestFileKey = 'manifest.json';
const AWS = require("aws-sdk");
const polly = new AWS.Polly();
const bucketName = "polly-voice-notes";
const pollyCommonParas = {
OutputFormat: "mp3",
VoiceId: "Matthew",
OutputS3BucketName: bucketName
};
@EcutDavid
EcutDavid / ui.js
Last active September 3, 2019 02:55
build-kite-stuff
// Retry the first time time-out
document.querySelectorAll('.build-details-pipeline-job-state-timed_out, .build-details-pipeline-job-state-failed').forEach(d => {
d.querySelector('i').click();
d.querySelector('a[href$=retry]').click();
});
// Parsing a graph from the input, then, dfs to walk through the map.
package main
import (
"fmt"
)
var (
braceOpenASC = "("[0]
braceCloseASC = ")"[0]
@EcutDavid
EcutDavid / bookmark.js
Last active November 9, 2018 10:33
Download Codeforces test cases
var inputs = document.querySelectorAll(".input pre");
for (var i = 0; i < inputs.length; i++) {
var s = inputs[i].innerHTML;
s = s.replace(/<br>/g, "\n");
console.log(s)
// decode html entities
var div = document.createElement("div");
div.innerHTML = s;