<properties>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
</properties>
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
# src/simulation/controller/CMakeLists.txt | |
cmake_minimum_required(VERSION 3.5) | |
project(controller) | |
# Default to C99 | |
if(NOT CMAKE_C_STANDARD) | |
set(CMAKE_C_STANDARD 99) | |
endif() | |
# Default to C++14 |
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
from md2pdf.core import md2pdf | |
import requests | |
from bs4 import BeautifulSoup | |
from typing import List | |
import json | |
import time | |
from web_util import parse_curl | |
headers = {} | |
with open("CURL") as f: | |
_, headers = parse_curl(f.read()) |
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
import os | |
import click | |
import datetime | |
import sys | |
DURATION = 24*3600 | |
DEBUG = False | |
now = datetime.datetime.now().timestamp() | |
def check_time(timestamp, duration): | |
return (now - timestamp)<duration |
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
function myFunction() { | |
// add to ui | |
var ui = SpreadsheetApp.getUi(); | |
ui.createMenu("Sync to Calendar") | |
.addItem("Schedule life", "schedule") | |
.addToUi(); | |
} | |
function schedule() { | |
var eventCal = CalendarApp.getCalendarById(xxxxxxx); | |
var spreadsheet = SpreadsheetApp.getActiveSheet(); |
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
// ==UserScript== | |
// @name One-click to add all people | |
// @namespace ztc | |
// @description one-click to log down people I want to know | |
// @include https://www.linkedin.com/search/* | |
// @version 0.4 | |
// @grant GM_setClipboard | |
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAsSAAALEgHS3X78AAAAFXRFWHRDcmVhdGlvbiBUaW1lADYvMjQvMDn2wWvjAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M0BrLToAAAAY9QTFRFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWJ+8Upq2DFJ4BklsVJu4CU1zCU5zTpWyV5+7DlN4B0twB0tvCU50C1mEC1+NDFF3DGWWDmSRD2iYEFV5EmuaE1d7FGeTFVp9FWGKFW2cGFyAGHCeGmCDG3OgHWKFHnWiIGSHIXikI2iLJHumJmuNKG6PKH2oK3CSK4CrLnSVLoOtL2iDMHaXMYavM3maNHOQNIixNXaUNnycN4uzOX6eOX+fOo21O3SLPIKiPY2yPY2zPZC3PoqtP4WkP42xQJO5QoinQ5W7RYuqRpi9SIOfSI+sSZu/S5KvS5OwTJ3BTpe6T6DDUYGXUpq2UqPFVZy5VabHV566WKjJWafHW4eaW6vLXaHAYa7NYqC+Yq3MY6LBZ6K9aq7Kbq3Hc7LMdJindbjTgbTLhL/VicDXi6u5j8TZornErL7GuMbNxdDVy9ng1dzg19fX2tra3Nzc3ODh3t7e5ubm6Ojo6urq7e3t7+/v8fHx9PT09vb2+fn5+/v7/f39/////8EcrgAAA |
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
// ==UserScript== | |
// @name leetcode notification | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://leetcode.com/* | |
// @grant none | |
// ==/UserScript== |
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
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM/dd/yyyy HH:mm:ss"); | |
ZonedDateTime start_time = LocalDateTime.parse(p.getStart_time(), formatter).atZone(ZoneId.of("America/Chicago")); | |
start_time.format(DateTimeFormatter.ISO_INSTANT).toString() |
- FROM: pull basic image
- VOLUME: create a mount point
- ARG : set arg when build it docker build --build-arg some_variable_name=a_value
- RUN : run command before start
- COPY : copy local file to container
- ENV : env path
- CMD : run command in the beginning. only one effect https://vsupalov.com/docker-env-vars/
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
/*************************************************************************** | |
* A Linked List class with a private static inner Node class. | |
* source: https://www.cs.cmu.edu/~adamchik/15-121/lectures/Linked%20Lists/code/LinkedList.java | |
*****************************************************************************/ | |
import java.util.*; | |
public class LinkedList<AnyType> implements Iterable<AnyType> | |
{ | |
private Node<AnyType> head; |
NewerOlder