-
Command Input:
- The user types
ls -l
in the terminal, and the shell reads this input.
- The user types
-
Command Parsing & PATH Variable:
- The shell parses the command and its arguments.
- The shell searches for the
ls
binary in the directories listed in the PATH environment variable.
-
Permission & Access Check:
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDCz7oMPKkaM3s4Q1t1lZ9V4HPxeh9OtMIVEfzl7vmcEDRORAu7ne5NKww7KbFHPJdl1USF59ZY1W1ANu8hqRHIdKbUptASWBTGSkDWrDEF467YEwio/ONRHgStjvy6Z1xI2yltaouyz6+p21GfPY7/miXOSBmPy5ObuUcBgz+hLullq50hi0uLCkoYPH4p9uTtW0gMR9h7N06AZPb8sh1+vQOAA9QMc00XaahVlwwdZDKvYL4mOh7yCIHUSJojaTugwEngCJNDegwRBn8OAML0awY5daKaAON5PQx4qAqAsGrl10yyZmtaK4Ec3LSD6IYAT950x0gimKN0P4rBSFJ0XSGfQH5hcCpQCshncS6ivmvKR0V8Zr5TEUKymYvgCjA0q5n4Mkx4vl3M3WpOt5hv7nLfWlzNlnK17Kdn2c3fJiHu/eR/mO6R1e2L/Bn6s3uTimoNDmajpgfsYPqPragYPoI3TP5OTp+m5QL2YFVl6IySuGHZIvxp8HTrr4KwgYvnOEvUfjWofP1YstwvWNPSDhs9zQqO6Ka0VNXiQNWBVDSonG9JUU7mh9LQl7ieHKqojj1gbj6tUXY+yxboVCPwc/lBdl+fQdNTCOFFB8K0SJBcO/sEZaepCC4ZPp1ExKbgjAOnBFLYj70zC1vwMsOLycH+nQ18nIyIGHG07TOdnQ== baurzhan@MacBook-Pro.home |
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
input = [[1,2,3], | |
[3], | |
[4], | |
[5,6], | |
[1,7], | |
[2,8], | |
[4,9]] | |
""" |
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
# Configure Ruby and Gems paths on Mac | |
export RUBY_PATH=/usr/local/opt/ruby/bin | |
export PATH="$RUBY_PATH:$PATH" | |
export RUBY_VERSION=$($RUBY_PATH/ruby -e "puts RUBY_VERSION") | |
export PATH="/usr/local/lib/ruby/gems/$RUBY_VERSION/bin:$PATH" | |
export GEM_HOME="$HOME/.gem" | |
export GEM_PATH="$GEM_HOME/ruby/$RUBY_VERSION" |
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
I'll be omitting syscalls with ellipsis. | |
The first thing that happens after you press enter is that bash resolves | |
curl to /usr/bin/curl and then forks(). The strace output is from the | |
forked process. | |
Fist execve() the /usr/bin/curl binary and pass an array of arguments to it. | |
execve("/usr/bin/curl", ["curl", "http://github.com"], [/* 8 vars */]) = 0 | |
... |
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
# encode from binary file to base64txt | |
powershell -C "& {$outpath = (Join-Path (pwd) 'out_base64.txt'); $inpath = (Join-Path (pwd) 'data.jpg'); [IO.File]::WriteAllText($outpath, ([convert]::ToBase64String(([IO.File]::ReadAllBytes($inpath)))))}" | |
# decode from base64txt to binary file | |
powershell -C "& {$outpath = (Join-Path (pwd) 'outdata2.jpg'); $inpath = (Join-Path (pwd) 'out_base64.txt'); [IO.File]::WriteAllBytes($outpath, ([convert]::FromBase64String(([IO.File]::ReadAllText($inpath)))))}" |
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
# recipe1.rb, which I am writing test for | |
powershell_script "Check if service needs to be restarted" do | |
code XXXX | |
notifies :restart, windows_service[resource_from_other_collection], :delayed | |
action :run | |
end | |
# recipe2.rb, which I am writing test for | |
windows_service "resource_from_other_collection" do | |
action :nothing |
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
#!/bin/sh | |
# | |
# For each ref, validate the commit. | |
# | |
# - It disallows deleting branches without a /. | |
# - It disallows non fast-forward on branches without a /. | |
# - It disallows deleting tags without a /. | |
# - It disallows unannotated tags to be pushed. |
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
public List<Evaluation> findEvaluationsAssignedToUser(String login, Integer tenderId, Integer proposalId) { | |
Connection connection = null; | |
PreparedStatement preparedStatement = null; | |
List<Evaluation> evaluations = new ArrayList<>(); | |
System.out.println("from EvaluationDaoImpl findEvaluationsAssignedToUser start" + evaluations); | |
try { | |
System.out.println("from findEvaluationsAssignedToUser page login" +login+" tenderId "+ tenderId+" proposalId "+proposalId); | |
connection = ConnectionPool.getInstance().getConnection(); | |
preparedStatement = connection.prepareStatement(PREPARED_STATEMENT_EVALUATION_FIND_BY_USER); | |
preparedStatement.setString(1, login); |
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
https://github.com/facebook/chef-cookbooks/blob/master/README.md | |
https://github.com/facebook/chef-utils/blob/master/Philosophy.md | |
Example cookbook: https://github.com/facebook/chef-cookbooks/tree/master/cookbooks/fb_cron |
NewerOlder