[TOC]
Git provides 2 ways to patch the repo, git format-patch
and git diff
also available in source tree
def has_common(a: list, b: list) -> bool: | |
_ = set(a).intersection(set(b)) | |
print(_) | |
return bool(_) | |
def has_common1(a: list, b: list) -> bool: | |
set_a = set(a) | |
set_b = set(b) |
UPDATE: As of compose file version 3.5:
This now works:
version: "3.5"
services:
proxy:
image: hello-world
ports:
- "80:80"
<img src="image.png" width="50%" height="50%" /> |
Zsh
iterm2 theme: https://github.com/sindresorhus/iterm2-snazzy?tab=readme-ov-file
brew install zsh
# Set zsh as default shell
sudo sh -c "echo $(which zsh) >> /etc/shells" && chsh -s $(which zsh)
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
Since json cannot serialize the datetime
object, if you need to json.dumps
and then write it into mongo, you need to use pymongo utility which help to serialize the datetime
object
Given data like this
import datetime
import json
sample = {}
sample['title'] = "String"
sample['somedate'] = datetime.datetime.now()
<!DOCTYPE html> | |
<html> | |
<body style="overflow: hidden"> | |
<script type="text/javascript"> | |
function SetCwinHeight() { | |
//var a = document.getElementById("mainframe").Document.body.scrollHeight | |
//var a = document.getElementById("mainframe").contentWindow.document | |
//var a = "111" | |
console.log(window.innerHeight) |
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
p { | |
white-space: nowrap; | |
} | |
</style> | |
</head> | |
<body> |
Overlay thumbnail with remove image button This will show the icon when you hover the thumbnail, and when you hover the icon on top of that, it will change to a hover icon.
https://stackoverflow.com/questions/1909850/overlay-thumbnail-with-remove-image-button