This file contains hidden or 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
<body> | |
<script type="module"> | |
import { css } from './zercss.js'; | |
// Global styles | |
css` | |
&{} /* This would be a global CSS */ | |
* { margin: 0; padding: 0; box-sizing: border-box; } | |
body { max-width: 40rem; padding: 2rem; margin: auto; } | |
`; |
This file contains hidden or 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
[user] | |
# name = yourname | |
# email = [email protected] | |
[merge] | |
tool = vimdiff | |
[mergetool] | |
keeptemporaries = false | |
keepbackups = false |
This file contains hidden or 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
# Container lifecycle | |
alias dps='docker ps' | |
alias dpsa='docker ps -a' | |
alias dip='docker inspect --format "{{ .NetworkSettings.IPAddress }}" ' | |
alias dstop='docker stop $(docker ps -a -q)' | |
alias drm='docker rm $(docker ps -a -q)' | |
dshell () | |
{ | |
(docker exec -ti $1 bash) || (docker exec -ti $1 sh); |
This file contains hidden or 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
###> idea dictionaries ### | |
.idea/* | |
!.idea/inspectionProfiles/ | |
!.idea/dictionaries/ | |
###< idea dictionaries ### |
This file contains hidden or 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
1: 01-02-0010 | |
2: 01-02-0021 | |
3: 01-02-0027 | |
4: 01-02-0038 | |
5: 01-02-0049 | |
6: 01-02-0055 | |
7: 01-02-0066 | |
8: 01-02-0077 | |
9: 01-02-0083 | |
10: 01-02-0094 |
This file contains hidden or 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 | |
$date = new DateTime('0001-01-01'); | |
$now = new DateTime('2022-01-01'); | |
$count = 0; | |
while ($date < $now) { | |
$isSuitable = false; | |
if ((int)$date->format('m') === 2) { |
This file contains hidden or 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
# Get from https://diamantidis.github.io/tips/2020/07/01/list-makefile-targets | |
.DEFAULT_GOAL := help | |
.PHONY: help | |
help: | |
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) \ | |
| sed -n 's/^\(.*\): \(.*\)##\(.*\)/\1\3/p' \ | |
| column -t -s ' ' | |
install: ## Install |
This file contains hidden or 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 | |
//language=cpp | |
$headers = <<<'cpp' | |
int MessageBoxA(void* hwnd, const char* lpText, const char* lpCaption, unsigned int uType); | |
cpp; | |
$ffi = \FFI::cdef($headers, 'User32.dll'); | |
$ffi->MessageBoxA(null, 'title', 'descr', 0); |
This file contains hidden or 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
struct uzel { | |
uzel* child1; | |
uzel* child2; | |
uzel* parent; | |
} | |
function procesedTree(uzel* node) { | |
if (node->child1 != NULL) processedTree(node->child1); | |
if (node->child2 != NULL) processedTree(node->child2); | |
This file contains hidden or 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 ReportTool () {} | |
ReportTool.prototype.removeAllSuccessParts = () => { | |
const sList = document.getElementById('status_list'); | |
Array.prototype.forEach.call(sList.childNodes, (c) => { | |
if (c.tagName !== 'LI') return; | |
if (!c.classList.contains('failed')) sList.removeChild(c); | |
}); | |
} |