git --help git <command> --help
git commit -am wip git commit -m "Initial commit" --allow-empty git commit --amend --allow-empty --no-edit
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Hello Page</title> | |
<script src="https://unpkg.com/htmx.org@1.9.2"></script> | |
</head> | |
<body> | |
<h1>Hello</h1> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Hello Page</title> | |
<script src="https://unpkg.com/htmx.org@1.9.2"></script> | |
<script src="https://unpkg.com/mock-requests@1.3.2/index.js"></script> | |
<script language="javascript"> | |
MockRequests.setDynamicMockUrlResponse('/ui/button', | |
{ |
. |
import doctest | |
from collections import namedtuple | |
import sys | |
def parse_string(target): | |
""" | |
>>> list(parse_string('foo')('foobar')) | |
[('foo', 'bar')] | |
>>> list(parse_string('foo')('bar')) |
function test() { | |
var total = 0; | |
for(i = 0; i< 100000000; i++) { | |
total = total ^ ((i * i + i + 4 * i + 1) / i); | |
} | |
return total; | |
} | |
console.log(test()); |
import pytest | |
@pytest.fixture() | |
def user(request): | |
user = 'mock user' | |
if hasattr(request, 'param'): | |
user += ': {}'.format(request.param) | |
return user |
module Main where | |
main :: IO () | |
main = print $ fb <$> [0..15] | |
fb :: Int -> String | |
fb n = fallthrough (show n) concat [ (n `mod` 3 == 0, "Fizz") | |
, (n `mod` 5 == 0, "Buzz") | |
] |
import Control.Applicative | |
import Data.List | |
newtype Parser a = Parser { runParser :: String -> [(a, String)] } | |
parseConst :: a -> Parser a | |
parseConst a = Parser $ \s -> [(a, s)] | |
parseString :: String -> Parser String | |
parseString target = Parser p where |
from collections import namedtuple | |
Lazy = namedtuple('Lazy', 'force') | |
def parseConst(a): | |
""" | |
>>> parseConst(1)('') | |
[(1, '')] | |
""" |