Discover gists
\documentclass[titlepage]{article} | |
%\documentclass[14pt,titlepage]{extarticle} | |
%\usepackage[a4paper, total={6in, 8in}]{geometry} | |
% =========================== | |
%Packages | |
\usepackage[utf8]{inputenc} | |
\usepackage[english]{babel} | |
\usepackage{graphicx,tikz,pgfplots} | |
\usepackage{physics} | |
\usepackage{amsthm,amsmath,amssymb,amsfonts,mathtools} |
javascript:(window.location.href.indexOf("webcache.googleusercontent.com")>-1)?alert("Error:%20You%20are%20on%20the%20cached%20version."):window.location.assign("http://webcache.googleusercontent.com/search?q=cache:"+encodeURIComponent(window.location.href.replace(/(^\w+:|^)\/\//,''))); |
<?php | |
use Doctrine\ORM\Query\AST\Functions\FunctionNode; | |
use Doctrine\ORM\Query\Lexer; | |
use Doctrine\ORM\Query\Parser; | |
use Doctrine\ORM\Query\SqlWalker; | |
class Cast extends FunctionNode | |
{ | |
private $expr1; |
Winds up being a (not the) rather comprehensive JavaScript toolbox. The idea being for the modern JavaScript programmer can use all of the tools available for a given requirement, task or job, without preference for any. No external bundlers or
compilers are needed. No frameworks are needed. I can use qjs
or tjs
for systems
with minimal RAM and disk space; and when I want to use Web API's deno
makes an effort
to provide those interfaces. In some cases I can run the exact same code in bun
, deno
, and node
,
which provides a means to perform 1:1 testing as to performance.
There's probably a few things I am unintentionally omitting below. These are just a brief synposis. I'll update accordingly.
import os | |
def parse_man_file(man_filepath): | |
with open(man_filepath, "r") as man_file: | |
lines = man_file.read().split("\n") | |
formatted_lines = [] | |
for line in lines: | |
# remove Apple developer comments included on the same line and strip off trailing white space |
- http://stackoverflow.com/questions/804115 (
rebase
vsmerge
). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebase
vsmerge
) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
reset
vscheckout
vsrevert
) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse
) - http://stackoverflow.com/questions/292357 (
pull
vsfetch
) - http://stackoverflow.com/questions/39651 (
stash
vsbranch
) - http://stackoverflow.com/questions/8358035 (
reset
vscheckout
vsrevert
)
# alias to edit commit messages without using rebase interactive | |
# example: git reword commithash message | |
reword = "!f() {\n GIT_SEQUENCE_EDITOR=\"sed -i 1s/^pick/reword/\" GIT_EDITOR=\"printf \\\"%s\\n\\\" \\\"$2\\\" >\" git rebase -i \"$1^\";\n git push -f;\n}; f" | |
# edit all commit messages | |
git rebase -i --root | |
# clone all your repos with gh cli tool | |
gh repo list --json name -q '.[].name' | xargs -n1 gh repo clone |
package main | |
import "fmt" | |
func main() { | |
fmt.Println("hello world") | |
} |
When following a log file with the tail
command you are typically looking for a specific pattern. If the log output is verbous it can be difficult to catch the lines your interested in. For example a PHP log file might contain many PHP Notice:
entries but your only interested in lines containing PHP Fatal error:
. To grep the output of tail
simply tell the grep
command to red from stdin and pipe the output from tail
to grep
as follows.
tail -f {path/to/log/file} | grep 'PHP Fatal error:' -