The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,042 other followers

Archive for the ‘Software Development’ Category

Getting Started with Azure Event Grid Scenarios | Serverless360 Blog

Posted by jpluimers on 2020/07/30

For my link list, especially because how it categorises the various kinds of messages: [WayBackGetting Started with Azure Event Grid Scenarios | Serverless360 Blog:

  • messaging, which conveys an intent
  • eventing, which conveys a fact
    • series events, which represent a stream of events belonging together (like telemetry, logging, or streaming data)
    • discrete events, which are independent, and report some type of state change

If you use Azure, these solutions then apply to the categories:

  • messaging: Azure Event Bus
  • series events: Azure Event Hub
  • discrete events: Azure Event Grid

Related:

–jeroen

Posted in Cloud Development, Development, Software Development, Windows Azure | Leave a Comment »

Running Visual Studio Code on macOS from the terminal

Posted by jpluimers on 2020/07/30

For running Visual Studio Code from the terminal, you need to do a few extra steps as from Running Visual Studio Code on macOS: Get Visual Studio Code up and running on Mac (macOS):

Launching from the Command Line

You can also run VS Code from the terminal by typing ‘code’ after adding it to the path:

  1. Launch VS Code.
  2. Open the Command Palette (⇧⌘P) and type ‘shell command’ to find the Shell Command: Install ‘code’ command in PATH command.

macOS shell commands

  • Restart the terminal for the new $PATH value to take effect. You’ll be able to type ‘code .’ in any folder to start editing files in that folder.

Note: If you still have the old code alias in your .bash_profile (or equivalent) from an early VS Code version, remove it and replace it by executing the Shell Command: Install ‘code’ command in PATH command.

To manually add VS Code to your path:

cat << EOF >> ~/.bash_profile
# Add Visual Studio Code (code)
export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
EOF

This is what the code command is and does:

$ which code
/usr/local/bin/code
$ ls -alh `which code`
lrwxr-xr-x  1 jeroenp  admin    68B Apr 16 13:24 /usr/local/bin/code -> /Applications/Visual Studio Code.app/Contents/Resources/app/bin/code
$ cat `which code`
#!/usr/bin/env bash
#
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.

function realpath() { /usr/bin/python -c "import os,sys; print(os.path.realpath(sys.argv[1]))" "$0"; }
CONTENTS="$(dirname "$(dirname "$(dirname "$(dirname "$(realpath "$0")")")")")"
ELECTRON="$CONTENTS/MacOS/Electron"
CLI="$CONTENTS/Resources/app/out/cli.js"
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@"
exit $?

–jeroen

 

Posted in Development, Software Development, Visual Studio and tools | Leave a Comment »

Bogus W1036 ? 

Posted by jpluimers on 2020/07/30

Reminder to self for checking if this still fails:

[WayBack] Bogus W1036 ? Documentation: … “If you do not explicitly initialize a global variab… – Stefan Glienke – Google+

Documentation: http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Variables_(Delphi)

“If you do not explicitly initialize a global variable, the compiler initializes it to 0.”

{$APPTYPE CONSOLE}

var
  i: Integer;
begin
  Writeln(i);
end.

Error:

[DCC Warning] Project1.dpr(6): W1036 Variable 'i' might not have been initialized

–jeroen

Posted in Delphi, Development, Software Development | 2 Comments »

Searching github commits

Posted by jpluimers on 2020/07/29

Finding the github commit search page was not obvious to me as the main page only allows searching for repositories, and commit pages insides repositories do not have a search box:

Luckily there are two search pages that can search issues:

You can get to both by stumbling on [WayBack] About searching on GitHub – User Documentation, then clicking “Search using a visual interface”

The first search page has built-in help which I have included below, though not explaining how to search for commits which are in [WayBack] Searching commits – User Documentation, and certainly does not tell you need to add type=commitsto the search box.

Actually, there is no “visual interface” for commit search: it is a question of assembling the search URL by hand, though this trick helps a lot:

  1. Use GitHub · Where software is built: Advanced Search to make a similar search for a repository:
    • define repository
    • define phrase
    • define date range
  2. Adopt the URL with key/value information from Searching commits – User Documentation
  3. Remember a base search inside a repository is like https://github.com/search?utf8=%E2%9C%93&q=repo:jpluimers%2FGExperts+search&type=commits which searches
    • repository jpluimers/GExperts
    • phrase search
    • type=commits

This is how I got

Back to the basic search

Search cheat sheet

GitHub’s search supports a variety of different operations. Here’s a quick cheat sheet for some of the common searches.

For more information, visit our search help section.

Basic search

This search Finds repositories with…
cat stars:>100 Find cat repositories with greater than 100 stars.
user:defunkt Get all repositories from the user defunkt.
tom location:”San Francisco, CA” Find all tom users in “San Francisco, CA”.
join extension:coffee Find all instances of join in code with coffee extension.
NOT cat Excludes all results containing cat.

Repository search

Repository search looks through the projects you have access to on GitHub. You can also filter the results:

This search Finds repositories with…
cat stars:>100 Find cat repositories with greater than 100 stars.
user:defunkt Get all repositories from the user defunkt.
pugs pushed:>2013-01-28 Pugs repositories pushed to since Jan 28, 2013.
node.js forks:<200 Find all node.js repositories with less than 200 forks.
jquery size:1024..4089 Find jquery repositories between the sizes 1024 and 4089 kB.
gitx fork:true Repository search includes forks of gitx.
gitx fork:only Repository search returns only forks of gitx.

Code search

Code search looks through the files hosted on GitHub. You can also filter the results:

This search Finds repositories with…
install repo:charles/privaterepo Find all instances of install in code from the repository charles/privaterepo.
shogun user:heroku Find references to shogun from all public heroku repositories.
join extension:coffee Find all instances of join in code with coffee extension.
system size:>1000 Find all instances of system in code of file size greater than 1000kbs.
examples path:/docs/ Find all examples in the path /docs/.
replace fork:true Search replace in the source code of forks.

Issue search

Issue search looks through issues and pull requests on GitHub. You can also filter the results:

This search Finds issues…
encoding user:heroku Encoding issues across the Heroku organization.
cat is:open Find cat issues that are open.
strange comments:>42 Issues with more than 42 comments.
hard label:bug Hard issues labeled as a bug.
author:mojombo All issues authored by mojombo.
mentions:tpope All issues mentioning tpope.
assignee:rtomayko All issues assigned to rtomayko.
exception created:>2012-12-31 Created since the beginning of 2013.
exception updated:<2013-01-01 Last updated before 2013.

User search

User search finds users with an account on GitHub. You can also filter the results:

This search Finds repositories with…
fullname:”Linus Torvalds” Find users with the full name “Linus Torvalds”.
tom location:”San Francisco, CA” Find all tom users in “San Francisco, CA”.
chris followers:100..200 Find all chris users with followers between 100 and 200.
ryan repos:>10 Find all ryan users with more than 10 repositories.

Then the commit search

Search within commit messages

You can find commits that contain particular words in the message. For example, fix typo matches commits containing the words “fix” and “typo.”

Search by author or committer

You can find commits by a particular user with the author or committer qualifiers.

Qualifier Example
author:USERNAME author:defunkt matches commits authored by @defunkt.
committer:USERNAME committer:defunkt matches commits committed by @defunkt.

The author-name and committer-name qualifiers match commits by the name of the author or committer.

Qualifier Example
author-name:NAME author-name:wanstrath matches commits with “wanstrath” in the author name.
committer-name:NAME committer-name:wanstrath matches commits with “wanstrath” in the committer name.

The author-email and committer-email qualifiers match commits by the author’s or committer’s full email address.

Qualifier Example
author-email:EMAIL author-email:chris@github.com matches commits authored by chris@github.com.
committer-email:EMAIL committer-email:chris@github.com matches commits committed by chris@github.com.

Search by authored or committed date

Use the author-date and committer-date qualifiers to match commits authored or committed within the specified date range.

Dates support greater than, less than, and range qualifiers.

Qualifier Example
author-date:YYYY-MM-DD author-date:<2016-01-01 matches commits authored before 2016-01-01.
committer-date:YYYY-MM-DD committer-date:>2016-01-01 matches commits committed after 2016-01-01.

Filter merge commits

The merge qualifier filters merge commits.

Qualifier Example
merge:true merge:true matches merge commits.
merge:false merge:false matches non-merge commits.

Search by hash

The hash qualifier matches commits with the specified SHA-1 hash.

Qualifier Example
hash:HASH hash:124a9a0ee1d8f1e15e833aff432fbb3b02632105 matches commits with the hash 124a9a0ee1d8f1e15e833aff432fbb3b02632105.

Search by parent

The parent qualifier matches commits whose parent has the specified SHA-1 hash.

Qualifier Example
parent:HASH parent:124a9a0ee1d8f1e15e833aff432fbb3b02632105 matches children of commits with the hash 124a9a0ee1d8f1e15e833aff432fbb3b02632105.

Search by tree

The tree qualifier matches commits with the specified SHA-1 git tree hash.

Qualifier Example
tree:HASH tree:99ca967 matches commits that refer to the tree hash 99ca967.

Search within a user’s or organization’s repositories

To search commits in all repositories owned by a certain user or organization, use the user or orgqualifier. To search commits in a specific repository, use the repo qualifier.

Qualifier Example
user:USERNAME gibberish user:defunkt matches commit messages with the word “gibberish” in repositories owned by @defunkt.
org:ORGNAME test org:github matches commit messages with the word “test” in repositories owned by @github.
repo:USERNAME/REPO language repo:defunkt/gibberish matches commit messages with the word “language” in @defunkt’s “gibberish” repository.

Filter public or private repositories

The is qualifier matches public or private commits.

Qualifier Example
is:public is:public matches public commits.
is:private is:private matches private commits.

Further reading

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, GitHub, LifeHacker, Power User, Software Development, Source Code Management | Leave a Comment »

UAC elevation steps

Posted by jpluimers on 2020/07/29

Just in case I need to explain this to someone, as it has been a long time ago I did this: [WayBack] windows – Is there a single UAC binary? – Super User.

Via: [WayBack] Jeroen Wiert Pluimers: Is there a UAC binary? – Google+

Most important reference: [WayBack] How User Account Control Works | Microsoft Docs

  1. Logon:
  2. Elevation steps: decision tree in the various pieces:
  3. Elevation confirmation via consent.exe
  4. Consent example prompt:

 

–jeroen

Posted in Development, Power User, Security, Software Development, Windows, Windows Development | Leave a Comment »

 
%d bloggers like this: