tag:blogger.com,1999:blog-73765222024-03-07T02:38:20.537-03:00rbf7techUnknownnoreply@blogger.comBlogger639125tag:blogger.com,1999:blog-7376522.post-19141085270822495562023-06-27T15:21:00.002-03:002023-06-27T15:21:25.183-03:00Powershell Microsoft.PowerShell_profile.ps1 is not digitally signed<p> PowerShell running .ps1 files not signed and remote</p><p><br /></p><p>. : File c:\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 cannot be loaded. The file C:\Users\xxx\\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 is not digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.At line:1 char:3</p><p> + CategoryInfo : SecurityError: (:) [], PSSecurityException</p><p> + FullyQualifiedErrorId : UnauthorizedAccess</p><p><br /></p><p><br /></p><p>Fix:</p><p>Unblock-File -Path 'C:\Users\xxx\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1'</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7376522.post-50907603972049216182023-04-06T13:38:00.003-03:002023-04-06T13:38:20.271-03:00Remove anydesk printer driver from windows 11<p> Open CMD with Admin privilegies</p><p><br /></p><p>Run</p><p>pnputil.exe /delete-driver c:\Windows\System32\DriverStore\FileRepository\anydeskprintdriver.inf_amd64_07b22d0a6997cb3a\anydeskprintdriver.inf /uninstall</p><p>Or find your .inf folder.</p><p>Reference</p><p><a href="https://learn.microsoft.com/en-us/windows-hardware/drivers/install/how-devices-and-driver-packages-are-uninstalled">https://learn.microsoft.com/en-us/windows-hardware/drivers/install/how-devices-and-driver-packages-are-uninstalled</a><br /></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7376522.post-76539558287136171862022-11-03T15:59:00.001-03:002022-11-03T15:59:03.137-03:00React example with Yarn<p> <a href="https://codefresh.io/docs/docs/learn-by-example/nodejs/react/">https://codefresh.io/docs/docs/learn-by-example/nodejs/react/</a></p><p><br /></p><h1 class="bd-title" id="content" style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 3rem; font-variant-ligatures: none; line-height: 1.1; margin-bottom: 1rem; margin-top: 1rem;">React example with Yarn</h1><p class="bd-lead" style="box-sizing: inherit; color: #3d7c84; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 1.5rem; font-variant-ligatures: none; line-height: 1.8125rem; margin-bottom: 2rem; margin-top: 0px; max-width: 100%;">Create Docker images for React applications</p><p style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; line-height: 1.8125rem; margin-bottom: 1rem; margin-top: 0px; max-width: 100%;">Codefresh can work with React projects as with any <a href="https://codefresh.io/docs/docs/learn-by-example/nodejs/" style="background-color: rgba(17, 181, 164, 0.1); border-bottom: 1px solid rgba(61, 124, 132, 0.2); box-sizing: inherit; color: #11b5a4; text-decoration-line: none; transition: background 0.2s ease 0s, border-color 0s ease 0s, all 0.2s ease 0s;">Node.js project</a>.</p><h2 id="the-example-react-project" style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 2rem; font-variant-ligatures: none; line-height: 1.3; margin-bottom: 2rem; margin-top: 3.5rem; pointer-events: none;"><div style="box-sizing: inherit; pointer-events: auto;">The example React project<a aria-label="Anchor" class="anchorjs-link " data-anchorjs-icon="#" href="https://codefresh.io/docs/docs/learn-by-example/nodejs/react/#the-example-react-project" style="-webkit-font-smoothing: antialiased; box-sizing: inherit; color: rgba(17, 181, 164, 0.5); font-weight: 400; opacity: 0; padding-left: 0.375em; text-decoration-line: none; transition: color 0.16s linear 0s;"></a></div></h2><p style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; line-height: 1.8125rem; margin-bottom: 1rem; margin-top: 0px; max-width: 100%;">You can see the example project at <a href="https://github.com/codefresh-contrib/react-sample-app" style="background-color: rgba(17, 181, 164, 0.1); border-bottom: 1px solid rgba(61, 124, 132, 0.2); box-sizing: inherit; color: #11b5a4; text-decoration-line: none; transition: background 0.2s ease 0s, border-color 0s ease 0s, all 0.2s ease 0s;">https://github.com/codefresh-contrib/react-sample-app</a>. The repository contains a React starter project with the following tasks:</p><ul style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; line-height: 1.8125rem; margin-bottom: 1rem; margin-top: 0px; max-width: 100%; padding-left: 1rem;"><li style="box-sizing: inherit; margin-top: 0.625rem;"><code class="highlighter-rouge" style="background-color: #fffbe6; box-sizing: inherit; color: #ad6800; font-family: "Source Coe Pro", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; font-size: 14.875px; word-break: break-word;">yarn test</code> runs unit tests.</li><li style="box-sizing: inherit; margin-top: 0.625rem;"><code class="highlighter-rouge" style="background-color: #fffbe6; box-sizing: inherit; color: #ad6800; font-family: "Source Coe Pro", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; font-size: 14.875px; word-break: break-word;">yarn start</code> to start the application locally.</li><li style="box-sizing: inherit; margin-top: 0.625rem;"><code class="highlighter-rouge" style="background-color: #fffbe6; box-sizing: inherit; color: #ad6800; font-family: "Source Coe Pro", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; font-size: 14.875px; word-break: break-word;">yarn build</code> to create a production deployment.</li></ul><p style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; line-height: 1.8125rem; margin-bottom: 1rem; margin-top: 0px; max-width: 100%;">Once launched the application presents a simple page at localhost:3000.</p><h2 id="react-and-docker-multi-stage-builds" style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 2rem; font-variant-ligatures: none; line-height: 1.3; margin-bottom: 2rem; margin-top: 3.5rem; pointer-events: none;"><div style="box-sizing: inherit; pointer-events: auto;">React and Docker (multi-stage builds)<a aria-label="Anchor" class="anchorjs-link " data-anchorjs-icon="#" href="https://codefresh.io/docs/docs/learn-by-example/nodejs/react/#react-and-docker-multi-stage-builds" style="-webkit-font-smoothing: antialiased; box-sizing: inherit; color: rgba(17, 181, 164, 0.5); font-weight: 400; opacity: 0; padding-left: 0.375em; text-decoration-line: none; transition: color 0.16s linear 0s;"></a></div></h2><p style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; line-height: 1.8125rem; margin-bottom: 1rem; margin-top: 0px; max-width: 100%;">The easiest way to build a React.JS application is with <a href="https://blog.docker.com/2017/07/multi-stage-builds/" style="background-color: rgba(17, 181, 164, 0.1); border-bottom: 1px solid rgba(61, 124, 132, 0.2); box-sizing: inherit; color: #11b5a4; text-decoration-line: none; transition: background 0.2s ease 0s, border-color 0s ease 0s, all 0.2s ease 0s;">multi-stage builds</a>. With multi-stage builds a Docker build can use one base image for packaging/unit tests and a different one that will hold the runtime of the application. This makes the final image more secure and smaller in size (as it does not contain any development/debugging tools).</p><p style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; line-height: 1.8125rem; margin-bottom: 1rem; margin-top: 0px; max-width: 100%;">In the case of React, you can use a base image that has Node and all testing utilities, while the final image has your server (e.g. nginx) with the static content and nothing else.</p><p style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; line-height: 1.8125rem; margin-bottom: 1rem; margin-top: 0px; max-width: 100%;">The example project is actually using multi-stage builds by default.</p><p style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; line-height: 1.8125rem; margin-bottom: 1rem; margin-top: 0px; max-width: 100%;">Here is the multi-stage Dockerfile:</p><p style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; line-height: 1.8125rem; margin-bottom: 1rem; margin-top: 0px; max-width: 100%;"><code class="highlighter-rouge" style="background-color: #fffbe6; box-sizing: inherit; color: #ad6800; font-family: "Source Coe Pro", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; font-size: 14.875px; word-break: break-word;">Dockerfile</code></p><div class="bd-clipboard" style="box-sizing: inherit; color: #03363d; float: right; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; position: relative;"><button class="btn-clipboard" data-original-title="Copy to clipboard" style="appearance: button; background-color: #f8f9fa; border-color: initial; border-radius: 0px 0.25rem; border-style: initial; border-width: 0px; box-sizing: inherit; color: #3d7c84; cursor: pointer; display: block; font-family: inherit; font-size: 12.75px; line-height: inherit; margin: 0px; overflow: visible; padding: 0.25rem 0.5rem; position: absolute; right: -1.5rem; top: 0px; z-index: 10;" title="">Copy</button></div><figure class="highlight" style="background-color: #264a54; border-radius: 6px; box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; margin: 0px -1.5rem 1rem; padding: 2rem 1.5rem;"><pre style="background-color: transparent; border: 0px; box-sizing: inherit; color: #212529; font-family: "Source Coe Pro", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; font-size: 14.875px; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 0px;"><code class="language-docker" data-lang="docker" style="box-sizing: inherit; color: white; font-family: "Source Coe Pro", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; font-size: inherit; word-break: normal;"><span class="k" style="box-sizing: inherit; color: #e8f7f2;">FROM</span><span class="s" style="box-sizing: inherit; color: #d1f1a9;"> node:8.16 as build-deps</span>
<span class="k" style="box-sizing: inherit; color: #e8f7f2;">WORKDIR</span><span class="s" style="box-sizing: inherit; color: #d1f1a9;"> /usr/src/app</span>
<span class="k" style="box-sizing: inherit; color: #e8f7f2;">COPY</span><span class="s" style="box-sizing: inherit; color: #d1f1a9;"> package.json yarn.lock ./</span>
<span class="k" style="box-sizing: inherit; color: #e8f7f2;">RUN </span>yarn
<span class="k" style="box-sizing: inherit; color: #e8f7f2;">COPY</span><span class="s" style="box-sizing: inherit; color: #d1f1a9;"> . ./</span>
<span class="k" style="box-sizing: inherit; color: #e8f7f2;">RUN </span>yarn build
<span class="k" style="box-sizing: inherit; color: #e8f7f2;">FROM</span><span class="s" style="box-sizing: inherit; color: #d1f1a9;"> nginx:1.12-alpine</span>
<span class="k" style="box-sizing: inherit; color: #e8f7f2;">COPY</span><span class="s" style="box-sizing: inherit; color: #d1f1a9;"> --from=build-deps /usr/src/app/build /usr/share/nginx/html</span>
<span class="k" style="box-sizing: inherit; color: #e8f7f2;">EXPOSE</span><span class="s" style="box-sizing: inherit; color: #d1f1a9;"> 80</span>
<span class="k" style="box-sizing: inherit; color: #e8f7f2;">CMD</span><span class="s" style="box-sizing: inherit; color: #d1f1a9;"> ["nginx", "-g", "daemon off;"]</span></code></pre></figure><p style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; line-height: 1.8125rem; margin-bottom: 1rem; margin-top: 0px; max-width: 100%;">This docker build does the following:</p><ol style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; line-height: 1.8125rem; margin-bottom: 1rem; margin-top: 0px; max-width: 100%; padding-left: 1.3rem;"><li style="box-sizing: inherit; margin-top: 0.625rem;">Starts from the Node/Yarn image</li><li style="box-sizing: inherit; margin-top: 0.625rem;">Copies the dependencies inside the container</li><li style="box-sizing: inherit; margin-top: 0.625rem;">Copies the source code and creates all static files</li><li style="box-sizing: inherit; margin-top: 0.625rem;">Discards the Node.js image with all the JavaScript libraries</li><li style="box-sizing: inherit; margin-top: 0.625rem;">Starts again from the nginx image and copies <span style="box-sizing: inherit; font-weight: bolder;">static build result</span> created before</li></ol><p style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; line-height: 1.8125rem; margin-bottom: 1rem; margin-top: 0px; max-width: 100%;">The resulting is very small, as it contains only packaged/minified files.</p><h2 id="create-a-ci-pipeline-for-reactjs-docker-build" style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 2rem; font-variant-ligatures: none; line-height: 1.3; margin-bottom: 2rem; margin-top: 3.5rem; pointer-events: none;"><div style="box-sizing: inherit; pointer-events: auto;">Create a CI pipeline for React.js (Docker build)<a aria-label="Anchor" class="anchorjs-link " data-anchorjs-icon="#" href="https://codefresh.io/docs/docs/learn-by-example/nodejs/react/#create-a-ci-pipeline-for-reactjs-docker-build" style="-webkit-font-smoothing: antialiased; box-sizing: inherit; color: rgba(17, 181, 164, 0.5); font-weight: 400; opacity: 0; padding-left: 0.375em; text-decoration-line: none; transition: color 0.16s linear 0s;"></a></div></h2><p style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; line-height: 1.8125rem; margin-bottom: 1rem; margin-top: 0px; max-width: 100%;">Creating a CI/CD pipeline for React is very easy, because Codefresh can run any <a href="https://hub.docker.com/_/node/" style="background-color: rgba(17, 181, 164, 0.1); border-bottom: 1px solid rgba(61, 124, 132, 0.2); box-sizing: inherit; color: #11b5a4; text-decoration-line: none; transition: background 0.2s ease 0s, border-color 0s ease 0s, all 0.2s ease 0s;">node image</a> that you wish.</p><figure class="my-4 my-md-5" style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; margin-bottom: 3rem !important; margin-left: 0px; margin-right: 0px; margin-top: 3rem !important;"><p class="mb-2" style="box-sizing: inherit; margin-bottom: 0.5rem !important; margin-top: 0px;"><a class="d-block mr-auto" data-toggle="lightbox" data-type="image" href="https://codefresh.io/docs/images/learn-by-example/nodejs/react-pipeline-docker.png" style="box-sizing: inherit; color: rgba(17, 181, 164, 0.99); display: block !important; margin-right: auto !important; max-width: 80%; text-decoration-line: none;"><img alt="Creating a Docker image for react.js" class="img-fluid" src="https://codefresh.io/docs/images/learn-by-example/nodejs/react-pipeline-docker.png" style="border-style: none; box-sizing: inherit; height: auto; max-width: 100%; vertical-align: middle;" /></a></p><figcaption class="font-italic text-left" style="box-sizing: inherit; color: #3d7c84; font-size: 1rem; font-style: italic !important;">Creating a Docker image for react.js</figcaption></figure><p style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; line-height: 1.8125rem; margin-bottom: 1rem; margin-top: 0px; max-width: 100%;">Here is the <a href="https://github.com/codefresh-contrib/gradle-sample-app/blob/master/codefresh.yml" style="background-color: rgba(17, 181, 164, 0.1); border-bottom: 1px solid rgba(61, 124, 132, 0.2); box-sizing: inherit; color: #11b5a4; text-decoration-line: none; transition: background 0.2s ease 0s, border-color 0s ease 0s, all 0.2s ease 0s;">full pipeline</a> that creates the Docker image after checking out the code.</p><p style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; line-height: 1.8125rem; margin-bottom: 1rem; margin-top: 0px; max-width: 100%;"><code class="highlighter-rouge" style="background-color: #fffbe6; box-sizing: inherit; color: #ad6800; font-family: "Source Coe Pro", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; font-size: 14.875px; word-break: break-word;">codefresh.yml</code></p><div class="bd-clipboard" style="box-sizing: inherit; color: #03363d; float: right; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; position: relative;"><button class="btn-clipboard" data-original-title="Copy to clipboard" style="appearance: button; background-color: #f8f9fa; border-color: initial; border-radius: 0px 0.25rem; border-style: initial; border-width: 0px; box-sizing: inherit; color: #3d7c84; cursor: pointer; display: block; font-family: inherit; font-size: 12.75px; line-height: inherit; margin: 0px; overflow: visible; padding: 0.25rem 0.5rem; position: absolute; right: -1.5rem; top: 0px; z-index: 10;" title="">Copy</button></div><figure class="highlight" style="background-color: #264a54; border-radius: 6px; box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; margin: 0px -1.5rem 1rem; padding: 2rem 1.5rem;"><pre style="background-color: transparent; border: 0px; box-sizing: inherit; color: #212529; font-family: "Source Coe Pro", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; font-size: 14.875px; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 0px;"><code class="language-yaml" data-lang="yaml" style="box-sizing: inherit; color: white; font-family: "Source Coe Pro", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; font-size: inherit; word-break: normal;"><span class="na" style="box-sizing: inherit; color: #e8f7f2;">version</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s1" style="box-sizing: inherit; color: #d1f1a9;">'</span><span class="s" style="box-sizing: inherit; color: #d1f1a9;">1.0'</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">stages</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span>
<span class="pi" style="box-sizing: inherit; color: #e8f7f2;">-</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">prepare</span>
<span class="pi" style="box-sizing: inherit; color: #e8f7f2;">-</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">test</span>
<span class="pi" style="box-sizing: inherit; color: #e8f7f2;">-</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">build</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">steps</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">main_clone</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">title</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">Cloning main repository...</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">stage</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">prepare</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">type</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">git-clone</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">repo</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s1" style="box-sizing: inherit; color: #d1f1a9;">'</span><span class="s" style="box-sizing: inherit; color: #d1f1a9;">codefresh-contrib/react-sample-app'</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">revision</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">master</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">git</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">github</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">MyUnitTests</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">title</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">Unit test</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">stage</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">test</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">image</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">node:8.16</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">commands</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span>
<span class="pi" style="box-sizing: inherit; color: #e8f7f2;">-</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">yarn install</span>
<span class="pi" style="box-sizing: inherit; color: #e8f7f2;">-</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">yarn test</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">environment</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span>
<span class="pi" style="box-sizing: inherit; color: #e8f7f2;">-</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">CI=true</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">MyAppDockerImage</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">title</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">Building Docker Image</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">type</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">build</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">stage</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">build</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">image_name</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">react-sample-app</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">working_directory</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">./</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">tag</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s1" style="box-sizing: inherit; color: #d1f1a9;">'</span><span class="s" style="box-sizing: inherit; color: #d1f1a9;">with-nginx'</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">dockerfile</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">Dockerfile</span></code></pre></figure><p style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; line-height: 1.8125rem; margin-bottom: 1rem; margin-top: 0px; max-width: 100%;">This pipeline clones the source code, runs unit tests and finally creates a Docker image. Codefresh is automatically caching Docker layers (it uses the Docker image of a previous build as a cache for the next) and therefore builds will become much faster after the first one finishes.</p><h2 id="building-a-reactjs-application-without-docker" style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 2rem; font-variant-ligatures: none; line-height: 1.3; margin-bottom: 2rem; margin-top: 3.5rem; pointer-events: none;"><div style="box-sizing: inherit; pointer-events: auto;">Building a React.Js application without Docker<a aria-label="Anchor" class="anchorjs-link " data-anchorjs-icon="#" href="https://codefresh.io/docs/docs/learn-by-example/nodejs/react/#building-a-reactjs-application-without-docker" style="-webkit-font-smoothing: antialiased; box-sizing: inherit; color: rgba(17, 181, 164, 0.5); font-weight: 400; opacity: 0; padding-left: 0.375em; text-decoration-line: none; transition: color 0.16s linear 0s;"></a></div></h2><p style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; line-height: 1.8125rem; margin-bottom: 1rem; margin-top: 0px; max-width: 100%;">If your application is not dockerized yet, you can still create a pipeline that runs any command that you would run locally. You can also choose which Node version is used for each step of the pipeline by defining a different docker image for each step.</p><figure class="my-4 my-md-5" style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; margin-bottom: 3rem !important; margin-left: 0px; margin-right: 0px; margin-top: 3rem !important;"><p class="mb-2" style="box-sizing: inherit; margin-bottom: 0.5rem !important; margin-top: 0px;"><a class="d-block mr-auto" data-toggle="lightbox" data-type="image" href="https://codefresh.io/docs/images/learn-by-example/nodejs/react-pipeline-build.png" style="box-sizing: inherit; color: rgba(17, 181, 164, 0.99); display: block !important; margin-right: auto !important; max-width: 80%; text-decoration-line: none;"><img alt="Building a Reach.js application" class="img-fluid" src="https://codefresh.io/docs/images/learn-by-example/nodejs/react-pipeline-build.png" style="border-style: none; box-sizing: inherit; height: auto; max-width: 100%; vertical-align: middle;" /></a></p><figcaption class="font-italic text-left" style="box-sizing: inherit; color: #3d7c84; font-size: 1rem; font-style: italic !important;">Building a Reach.js application</figcaption></figure><p style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; line-height: 1.8125rem; margin-bottom: 1rem; margin-top: 0px; max-width: 100%;">Here is the <a href="https://github.com/codefresh-contrib/react-sample-app/blob/master/codefresh-only-build.yml" style="background-color: rgba(17, 181, 164, 0.1); border-bottom: 1px solid rgba(61, 124, 132, 0.2); box-sizing: inherit; color: #11b5a4; text-decoration-line: none; transition: background 0.2s ease 0s, border-color 0s ease 0s, all 0.2s ease 0s;">full pipeline</a> that creates a production deployment of all files.</p><p style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; line-height: 1.8125rem; margin-bottom: 1rem; margin-top: 0px; max-width: 100%;"><code class="highlighter-rouge" style="background-color: #fffbe6; box-sizing: inherit; color: #ad6800; font-family: "Source Coe Pro", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; font-size: 14.875px; word-break: break-word;">codefresh.yml</code></p><div class="bd-clipboard" style="box-sizing: inherit; color: #03363d; float: right; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; position: relative;"><button class="btn-clipboard" data-original-title="Copy to clipboard" style="appearance: button; background-color: #f8f9fa; border-color: initial; border-radius: 0px 0.25rem; border-style: initial; border-width: 0px; box-sizing: inherit; color: #3d7c84; cursor: pointer; display: block; font-family: inherit; font-size: 12.75px; line-height: inherit; margin: 0px; overflow: visible; padding: 0.25rem 0.5rem; position: absolute; right: -1.5rem; top: 0px; z-index: 10;" title="">Copy</button></div><figure class="highlight" style="background-color: #264a54; border-radius: 6px; box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; margin: 0px -1.5rem 1rem; padding: 2rem 1.5rem;"><pre style="background-color: transparent; border: 0px; box-sizing: inherit; color: #212529; font-family: "Source Coe Pro", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; font-size: 14.875px; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 0px;"><code class="language-yaml" data-lang="yaml" style="box-sizing: inherit; color: white; font-family: "Source Coe Pro", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; font-size: inherit; word-break: normal;"><span class="na" style="box-sizing: inherit; color: #e8f7f2;">version</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s1" style="box-sizing: inherit; color: #d1f1a9;">'</span><span class="s" style="box-sizing: inherit; color: #d1f1a9;">1.0'</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">stages</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span>
<span class="pi" style="box-sizing: inherit; color: #e8f7f2;">-</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">prepare</span>
<span class="pi" style="box-sizing: inherit; color: #e8f7f2;">-</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">test</span>
<span class="pi" style="box-sizing: inherit; color: #e8f7f2;">-</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">build</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">steps</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">main_clone</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">title</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">Cloning main repository...</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">stage</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">prepare</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">type</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">git-clone</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">repo</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s1" style="box-sizing: inherit; color: #d1f1a9;">'</span><span class="s" style="box-sizing: inherit; color: #d1f1a9;">codefresh-contrib/react-sample-app'</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">revision</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">master</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">git</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">github</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">MyUnitTests</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">title</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">Unit test</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">stage</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">test</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">image</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">node:11.0</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">commands</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span>
<span class="pi" style="box-sizing: inherit; color: #e8f7f2;">-</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">yarn install</span>
<span class="pi" style="box-sizing: inherit; color: #e8f7f2;">-</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">yarn test</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">environment</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span>
<span class="pi" style="box-sizing: inherit; color: #e8f7f2;">-</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">CI=true</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">MyReactBuild</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">title</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">Packaging application</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">stage</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">build</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">image</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">node:8.16</span>
<span class="na" style="box-sizing: inherit; color: #e8f7f2;">commands</span><span class="pi" style="box-sizing: inherit; color: #e8f7f2;">:</span>
<span class="pi" style="box-sizing: inherit; color: #e8f7f2;">-</span> <span class="s" style="box-sizing: inherit; color: #d1f1a9;">yarn build</span></code></pre></figure><p style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; line-height: 1.8125rem; margin-bottom: 1rem; margin-top: 0px; max-width: 100%;">Notice that for demonstration purposes we uses node 11 for the tests, and node 8 for the packaging. Normally you should use the same version of node/Yarn for all your steps, but Codefresh pipelines are flexible on version of tools.</p><p style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; line-height: 1.8125rem; margin-bottom: 1rem; margin-top: 0px; max-width: 100%;">Even when you don’t create a Docker image, Codefresh still caches your workspace volume. This means that <code class="highlighter-rouge" style="background-color: #fffbe6; box-sizing: inherit; color: #ad6800; font-family: "Source Coe Pro", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; font-size: 14.875px; word-break: break-word;">node_modules</code> are downloaded only once. All subsequent builds will be much faster.</p><h2 id="what-to-read-next" style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 2rem; font-variant-ligatures: none; line-height: 1.3; margin-bottom: 2rem; margin-top: 3.5rem; pointer-events: none;"><div style="box-sizing: inherit; pointer-events: auto;">What to read next<a aria-label="Anchor" class="anchorjs-link " data-anchorjs-icon="#" href="https://codefresh.io/docs/docs/learn-by-example/nodejs/react/#what-to-read-next" style="-webkit-font-smoothing: antialiased; box-sizing: inherit; color: rgba(17, 181, 164, 0.5); font-weight: 400; opacity: 0; padding-left: 0.375em; text-decoration-line: none; transition: color 0.16s linear 0s;"></a></div></h2><ul style="box-sizing: inherit; color: #03363d; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; font-size: 17px; font-variant-ligatures: none; line-height: 1.8125rem; margin-bottom: 1rem; margin-top: 0px; max-width: 100%; padding-left: 1rem;"><li style="box-sizing: inherit; margin-top: 0.625rem;"><a href="https://codefresh.io/docs/docs/learn-by-example/nodejs/" style="background-color: rgba(17, 181, 164, 0.1); border-bottom: 1px solid rgba(61, 124, 132, 0.2); box-sizing: inherit; color: #11b5a4; text-decoration-line: none; transition: background 0.2s ease 0s, border-color 0s ease 0s, all 0.2s ease 0s;">Node examples</a></li><li style="box-sizing: inherit; margin-top: 0.625rem;"><a href="https://codefresh.io/docs/docs/codefresh-yaml/what-is-the-codefresh-yaml/" style="background-color: rgba(17, 181, 164, 0.1); border-bottom: 1px solid rgba(61, 124, 132, 0.2); box-sizing: inherit; color: #11b5a4; text-decoration-line: none; transition: background 0.2s ease 0s, border-color 0s ease 0s, all 0.2s ease 0s;">Codefresh YAML</a></li><li style="box-sizing: inherit; margin-top: 0.625rem;"><a href="https://codefresh.io/docs/docs/codefresh-yaml/steps/" style="background-color: rgba(17, 181, 164, 0.1); border-bottom: 1px solid rgba(61, 124, 132, 0.2); box-sizing: inherit; color: #11b5a4; text-decoration-line: none; transition: background 0.2s ease 0s, border-color 0s ease 0s, all 0.2s ease 0s;">Pipeline steps</a></li><li style="box-sizing: inherit; margin-top: 0.625rem;"><a href="https://codefresh.io/docs/docs/configure-ci-cd-pipeline/pipelines/" style="background-color: rgba(17, 181, 164, 0.1); border-bottom: 1px solid rgba(61, 124, 132, 0.2); box-sizing: inherit; color: #11b5a4; text-decoration-line: none; transition: background 0.2s ease 0s, border-color 0s ease 0s, all 0.2s ease 0s;">Creating pipelines</a></li><li style="box-sizing: inherit; margin-top: 0.625rem;"><a href="https://codefresh.io/docs/docs/configure-ci-cd-pipeline/introduction-to-codefresh-pipelines/" style="background-color: rgba(17, 181, 164, 0.1); border-bottom: 1px solid rgba(61, 124, 132, 0.2); box-sizing: inherit; color: #11b5a4; text-decoration-line: none; transition: background 0.2s ease 0s, border-color 0s ease 0s, all 0.2s ease 0s;">How pipelines work</a></li></ul>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7376522.post-62059709992693011052022-11-03T15:49:00.001-03:002022-11-03T15:49:47.363-03:00Reactjs Build Production: Creating a Deployment Build That Optimizes Performance<p> <a href="https://www.copycat.dev/blog/reactjs-build-production/">https://www.copycat.dev/blog/reactjs-build-production/</a></p><p><br /></p><p>...</p><p>...</p><h2 id="6" style="background-color: white; border: 0px; box-sizing: border-box; color: #333333; font-family: Inter, Arial, sans-serif; font-size: 34px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; letter-spacing: -0.7px; line-height: 1.3em; margin: 32px auto; max-width: 740px; overflow-wrap: break-word; padding: 0px; vertical-align: baseline;">Additional ways of Reactjs build production</h2><p style="background-color: white; border: 0px; box-sizing: border-box; color: #444444; font-family: Inter, Arial, sans-serif; font-size: 19px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px auto 32px; max-width: 740px; padding: 0px; vertical-align: baseline;">In the above demo, we used the <span style="border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: 600; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">npm run build </span>command provided by the Create React App (CRA) for creating our production build. There are also other tools through which you can generate your prod build. Likewise, let us discuss a few of them in this section.</p><ol style="background-color: white; border: 0px; box-sizing: border-box; color: #444444; font-family: Inter, Arial, sans-serif; font-size: 19px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; list-style: none; margin: 32px auto; max-width: 740px; padding: 0px 0px 0px 30px; vertical-align: baseline;"><li style="border: 0px; font: inherit; list-style: decimal; margin: 0px; padding: 0px; vertical-align: baseline;"><span style="border: 0px; font-family: inherit; font-size: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: 600; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;">Brunch</span></li></ol><p style="background-color: white; border: 0px; box-sizing: border-box; color: #444444; font-family: Inter, Arial, sans-serif; font-size: 19px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px auto 32px; max-width: 740px; padding: 0px; vertical-align: baseline;">Brunch is a Fast front-end web app build tool useful for efficiently creating production build.</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7376522.post-76961812264694874072022-07-06T10:37:00.002-03:002022-07-07T16:06:52.263-03:00Zsh on Windows via MSYS2<div class="ib ic id ie if" style="background-color: white; box-sizing: inherit; color: rgba(0, 0, 0, 0.8); font-family: medium-content-sans-serif-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; overflow-wrap: break-word; word-break: break-word;"><div style="box-sizing: inherit;"><h1 class="pw-post-title ig ih ii bn ij ik il im in io ip iq ir is it iu iv iw ix iy iz ja jb jc jd je gj" data-selectable-paragraph="" id="c205" style="box-sizing: inherit; color: #292929; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 32px; letter-spacing: -0.016em; line-height: 40px; margin: 0.6em 0px -0.27em;">Source -> <a href="https://medium.com/@borekb/zsh-via-msys2-on-windows-3964a943b1ce">Visit the author</a></h1><h1 class="pw-post-title ig ih ii bn ij ik il im in io ip iq ir is it iu iv iw ix iy iz ja jb jc jd je gj" data-selectable-paragraph="" id="c205" style="box-sizing: inherit; color: #292929; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 32px; letter-spacing: -0.016em; line-height: 40px; margin: 0.6em 0px -0.27em;">Zsh on Windows via MSYS2</h1></div><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="66dc" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">This also helped me a lot <a href="https://conemu.github.io/en/CygwinMsysConnector.html">HERE</a></p><div class="language-plaintext highlighter-rouge" style="-webkit-text-stroke-width: 0px; background-color: #fdf6e3; color: #002b36; display: block; font-family: "Segoe UI", "Trebuchet MS", Verdana, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><div class="highlight" style="display: block; font-size: 16px;"><pre class="highlight" style="background-color: #002b36; border-radius: 0px 5px 5px; border: 4px solid rgb(147, 161, 161); box-shadow: rgb(131, 148, 150) 2px 2px 3px; color: #eee8d5; display: block; font-family: "andale mono", "lucida console", monospace; font-size: 0.8em; line-height: 1.5em; overflow: auto; padding: 0.7em; position: relative; white-space: pre; width: 731.5px; z-index: 1;"><code style="background-color: #002b36; border-radius: 0px; border: 0px; color: #eee8d5; font-family: "andale mono", "lucida console", monospace; line-height: 1.5em; margin: 0.1em; padding: 0px; white-space: pre;">set CHERE_INVOKING=1 &
set MSYSTEM=MINGW64 &
set MSYS2_PATH_TYPE=inherit &
set "MSYS2_PATH=D:\Users\USER\scoop\apps\msys2\current" &
set "PATH=%MSYS2_PATH%\usr\bin;%MSYS2_PATH%\mingw64\bin;%PATH%" &
"%ConEmuBaseDirShort%\conemu-msys2-64.exe" "/usr/bin/bash.exe" --login -i -new_console:p:C:"%MSYS2_PATH%\msys2.ico"</code></pre></div></div><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="66dc" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;"><span style="letter-spacing: -0.003em;">I have quite a long history trying to get “Linux-y” environment working on Windows (yes, I’m stuck on that platform), from enhanced </span><code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; letter-spacing: -0.003em; padding: 2px 4px;">cmd.exe</code><span style="letter-spacing: -0.003em;"> to WSL to Git Bash.</span></p><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="a806" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">I still think that Git Bash is the best middle ground for most people: super-easy to install (comes with <a class="au kh" href="https://gitforwindows.org/" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank">Git for Windows</a>), has very few issues and you can do almost anything you’d want on a Linux / macOS machine, e.g., <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">rm -rf node_modules</code>, single quotes, Bash scripting, etc.</p><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="28b1" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">The only limitation is that Git Bash comes with a fixed set of utilities — understandably as the project only maintains tools directly related to Git. So when you’re hunting for <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">rsync</code>, you're on your own. Same for zsh, and basically everything else.</p><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="3af4" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">I recently <a class="au kh" href="https://medium.com/@borekb/setting-up-mac-for-development-notes-from-a-windows-user-d4028535dc49" rel="noopener" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;">started using Mac</a> besides my Windows machine and some unification is crucial for my sanity, so especially zsh became a priority. And while I was at it, I reconsidered my tool chain on Windows. In the end, I switched to MSYS2, installed Git for Windows into it but it also unlocked a world of other packages for me. This is the best setup I found so far so I’d like to share it.</p><blockquote class="ki kj kk" style="box-shadow: rgb(41, 41, 41) 3px 0px 0px 0px inset; box-sizing: inherit; margin: 0px 0px 0px -20px; padding-left: 23px;"><p class="jf jg kl jh b ji jj jk jl jm jn jo jp km jr js jt kn jv jw jx ko jz ka kb kc ib gj" data-selectable-paragraph="" id="86d2" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; font-style: italic; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;"><span class="jh ij" style="box-sizing: inherit; font-weight: 700;">Note on WSL</span>: I love it in theory and think that it might<span class="jh ij" style="box-sizing: inherit; font-weight: 700;"> </span>make Windows the best development platform in the future (true Linux utilities, native Docker, etc.) but using it in practice feels quite cumbersome to me, as one simply is in a different operating system. For example, tools installed in WSL are not that easy to access from Windows, users are different, syncing system settings between machines works differently, updates are separate, etc. With MSYS2, there is just a single operating system: Windows.</p></blockquote><h1 class="kp kq ii bn kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh li lj lk ll lm gj" data-selectable-paragraph="" id="e24a" style="box-sizing: inherit; color: #292929; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 22px; letter-spacing: 0px; line-height: 28px; margin: 3.14em 0px -0.37em;">MSYS2</h1><p class="pw-post-body-paragraph jf jg ii jh b ji ln jk jl jm lo jo jp jq lp js jt ju lq jw jx jy lr ka kb kc ib gj" data-selectable-paragraph="" id="c883" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 0.86em 0px -0.46em; word-break: break-word;">Git for Windows builds on (is a friendly fork) of <a class="au kh" href="https://www.msys2.org/" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank">MSYS2</a> and the key to this whole setup is to turn it around: start from MSYS2 and install Git for Windows into it. This will allow us to then continue beyond its boundaries, with tools like <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">rsync</code> or <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">make</code>.</p><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="b1f5" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">MSYS2 is the underlying goodness so it’s vital to understand what it is. The project has a nice (and short!) <a class="au kh" href="https://github.com/msys2/msys2/wiki/MSYS2-introduction" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank">introduction</a> on their wiki, in essence:</p><ul style="box-sizing: inherit; list-style: none none; margin: 0px; padding: 0px;"><li class="ls lt ii jh b ji jj jm jn jq lu ju lv jy lw kc lx ly lz ma gj" data-selectable-paragraph="" id="7fcc" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 28px; list-style-type: disc; margin-bottom: -0.46em; margin-left: 30px; margin-top: 2.14em; padding-left: 0px;">MSYS2 (usually upper case) consists of three relatively separate subsystems: msys2 , mingw32 and mingw64.</li><li class="ls lt ii jh b ji mb jm mc jq md ju me jy mf kc lx ly lz ma gj" data-selectable-paragraph="" id="4650" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 28px; list-style-type: disc; margin-bottom: -0.46em; margin-left: 30px; margin-top: 1.14em; padding-left: 0px;">msys2 (sometimes called just msys) is an emulation layer — fully POSIX compatible but slow.</li><li class="ls lt ii jh b ji mb jm mc jq md ju me jy mf kc lx ly lz ma gj" data-selectable-paragraph="" id="e396" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 28px; list-style-type: disc; margin-bottom: -0.46em; margin-left: 30px; margin-top: 1.14em; padding-left: 0px;">mingw subsystems provide native Windows binaries, with Linux calls rewritten at compile time to their Windows equivalents. For example, Git for Windows is a <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">mingw64</code> binary (unlike msys Git which utilizes the compatibility layer and is therefore slow).</li><li class="ls lt ii jh b ji mb jm mc jq md ju me jy mf kc lx ly lz ma gj" data-selectable-paragraph="" id="00b2" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 28px; list-style-type: disc; margin-bottom: -0.46em; margin-left: 30px; margin-top: 1.14em; padding-left: 0px;">Each subsystem has its own shell and it’s important to be in the right one. The msys shell has a PATH starting with <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">/usr/local/bin:/usr/bin:/bin:...</code> while the mingw64 shell adds <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">/mingw64/bin</code> before it. This means that <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">/mingw64/bin/git.exe</code> is only available in the mingw64 shell.</li><li class="ls lt ii jh b ji mb jm mc jq md ju me jy mf kc lx ly lz ma gj" data-selectable-paragraph="" id="0418" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 28px; list-style-type: disc; margin-bottom: -0.46em; margin-left: 30px; margin-top: 1.14em; padding-left: 0px;">MSYS2 comes with Pacman, a package manager ported from Arch Linux, and many packages installable by <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">pacman -S <package></code>.</li></ul><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="cd81" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">Install MSYS2 by downloading the 64bit version from <a class="au kh" href="https://www.msys2.org/" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank">https://www.msys2.org/</a>, then check “Run MSYS2” and run this:</p><pre class="mg mh mi mj ga mk bt ml" style="background: rgb(242, 242, 242); box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"><span class="gj mm kq ii kg b do mn mo l mp" data-selectable-paragraph="" id="4088" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; white-space: pre-wrap;">pacman -Syu # repeat if necessary<br style="box-sizing: inherit;" />pacman -Su</span></pre><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="7ff8" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">When asked, close the terminal entirely and start it again via the start menu shortcut “MSYS2 MSYS”.</p><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="aac1" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">You now have the basic environment installed and updated. Close the terminal.</p><h1 class="kp kq ii bn kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh li lj lk ll lm gj" data-selectable-paragraph="" id="2381" style="box-sizing: inherit; color: #292929; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 22px; letter-spacing: 0px; line-height: 28px; margin: 3.14em 0px -0.37em;">$HOME</h1><p class="pw-post-body-paragraph jf jg ii jh b ji ln jk jl jm lo jo jp jq lp js jt ju lq jw jx jy lr ka kb kc ib gj" data-selectable-paragraph="" id="604e" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 0.86em 0px -0.46em; word-break: break-word;">By default, <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">$HOME</code> is <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">/home/You</code> (<code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">C:\msys64\home\You</code>). Let's switch it to <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">C:\Users\You</code> as usual so that for example your standard <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">.gitconfig</code> works.</p><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="0709" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">The best way is to use the Windows dialog; add this (use the standard Windows format, <em class="kl" style="box-sizing: inherit;">not</em> MSYS2 path <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">/c/...</code>):</p><pre class="mg mh mi mj ga mk bt ml" style="background: rgb(242, 242, 242); box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"><span class="gj mm kq ii kg b do mn mo l mp" data-selectable-paragraph="" id="ad83" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; white-space: pre-wrap;">HOME = C:\Users\You</span></pre><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="5bb3" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">I also tried other ways, e.g., updating <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">C:\msys64\etc\profile</code> or <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">C:\msys64\etc\bash.bashrc</code>, but they are less universal (depend on a specific shell, loading order, etc.).</p><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="41d0" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;"><span class="jh ij" style="box-sizing: inherit; font-weight: 700;">UPDATE</span>: for openssh (and maybe other programs) to work, also update the <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">db_home</code> line in <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">C:\msys64\etc\nsswitch.conf</code> to look like this:</p><pre class="mg mh mi mj ga mk bt ml" style="background: rgb(242, 242, 242); box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"><span class="gj mm kq ii kg b do mn mo l mp" data-selectable-paragraph="" id="8e4e" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; white-space: pre-wrap;">db_home: windows cygwin desc</span></pre><h1 class="kp kq ii bn kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh li lj lk ll lm gj" data-selectable-paragraph="" id="6370" style="box-sizing: inherit; color: #292929; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 22px; letter-spacing: 0px; line-height: 28px; margin: 3.14em 0px -0.37em;">ConEmu with mingw shell</h1><p class="pw-post-body-paragraph jf jg ii jh b ji ln jk jl jm lo jo jp jq lp js jt ju lq jw jx jy lr ka kb kc ib gj" data-selectable-paragraph="" id="99ca" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 0.86em 0px -0.46em; word-break: break-word;">Let’s switch to a better terminal app, <a class="au kh" href="https://conemu.github.io/" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank">ConEmu</a>.</p><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="5bde" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">I’ll recommend one controversial thing here: to only use the mingw64 shell from now on. This is in contrast with the <a class="au kh" href="https://github.com/msys2/msys2/wiki/MSYS2-introduction#path" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank">official wiki</a> which recommends to run Pacman in the msys shell but:</p><ol style="box-sizing: inherit; list-style: none none; margin: 0px; padding: 0px;"><li class="ls lt ii jh b ji jj jm jn jq lu ju lv jy lw kc mq ly lz ma gj" data-selectable-paragraph="" id="9f42" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 28px; list-style-type: decimal; margin-bottom: -0.46em; margin-left: 30px; margin-top: 2.14em; padding-left: 0px;">I didn’t hit any issues installing packages from the mingw shell.</li><li class="ls lt ii jh b ji mb jm mc jq md ju me jy mf kc mq ly lz ma gj" data-selectable-paragraph="" id="c4ea" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 28px; list-style-type: decimal; margin-bottom: -0.46em; margin-left: 30px; margin-top: 1.14em; padding-left: 0px;">I <em class="kl" style="box-sizing: inherit;">did</em> hit issues installing <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">mingw-w64-x86_64-git-lfs</code> from the msys shell, because it uses <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">git</code> as part of its installation which is not in msys’ PATH.</li><li class="ls lt ii jh b ji mb jm mc jq md ju me jy mf kc mq ly lz ma gj" data-selectable-paragraph="" id="6221" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 28px; list-style-type: decimal; margin-bottom: -0.46em; margin-left: 30px; margin-top: 1.14em; padding-left: 0px;">Worrying about two shells, two ConEmu tasks, two PATH configurations, etc. is IMO not worth it until proven otherwise.</li></ol><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="ebff" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">So in this section, we’ll only setup a ConEmu taks for mingw64. If you ever need the msys shell, use the “MSYS2 MSYS” shortcut in the Windows start menu.</p><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="f3a2" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">My <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">MSYS2::mingw</code> ConEmu task looks like this:</p><pre class="mg mh mi mj ga mk bt ml" style="background: rgb(242, 242, 242); box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"><span class="gj mm kq ii kg b do mn mo l mp" data-selectable-paragraph="" id="843c" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; white-space: pre-wrap;">set CHERE_INVOKING=1 & set MSYSTEM=MINGW64 & set MSYS2_PATH_TYPE=inherit & set “PATH=%ConEmuDrive%\msys64\mingw64\bin;%ConEmuDrive%\msys64\usr\bin;%PATH%” & %ConEmuBaseDirShort%\conemu-msys2–64.exe -new_console:p %ConEmuDrive%\msys64\usr\bin\bash.exe — login -i -new_console:C:”%ConEmuDrive%\msys64\msys2.ico”</span></pre><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="c2e9" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">It’s a copy of the default <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">{Bash::Msys2-64}</code> task with the <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">MSYSTEM</code> variable set (making it a mingw shell) and the <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">PATH</code> expanded to contain the full Windows path so that system-wide binaries like <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">node</code>, <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">yarn</code> or <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">kubectl</code> are accessible.</p><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="5078" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">If you ever need to confirm which shell you’re in, run <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">echo $MSYSTEM</code>.</p><h1 class="kp kq ii bn kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh li lj lk ll lm gj" data-selectable-paragraph="" id="f842" style="box-sizing: inherit; color: #292929; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 22px; letter-spacing: 0px; line-height: 28px; margin: 3.14em 0px -0.37em;">Essential utilities</h1><p class="pw-post-body-paragraph jf jg ii jh b ji ln jk jl jm lo jo jp jq lp js jt ju lq jw jx jy lr ka kb kc ib gj" data-selectable-paragraph="" id="a733" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 0.86em 0px -0.46em; word-break: break-word;">Let’s install some basic utilities:</p><pre class="mg mh mi mj ga mk bt ml" style="background: rgb(242, 242, 242); box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"><span class="gj mm kq ii kg b do mn mo l mp" data-selectable-paragraph="" id="6f14" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; white-space: pre-wrap;">pacman -S man vim nano<br style="box-sizing: inherit;" />pacman -S openssh rsync make<br style="box-sizing: inherit;" />pacman -S zip unzip<br style="box-sizing: inherit;" />pacman -S mingw64/mingw-w64-x86_64-jq</span></pre><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="bdba" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">Notice how easy it is to install things. For example, adding <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">rsync</code> to Windows is historically not easy at all — you end up going through various ports, forks, etc. This is <em class="kl" style="box-sizing: inherit;">much</em> easier.</p><blockquote class="ki kj kk" style="box-shadow: rgb(41, 41, 41) 3px 0px 0px 0px inset; box-sizing: inherit; margin: 0px 0px 0px -20px; padding-left: 23px;"><p class="jf jg kl jh b ji jj jk jl jm jn jo jp km jr js jt kn jv jw jx ko jz ka kb kc ib gj" data-selectable-paragraph="" id="7726" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; font-style: italic; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;"><span class="jh ij" style="box-sizing: inherit; font-weight: 700;">Note about </span><code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15.75px; padding: 2px 4px;"><span class="jh ij" style="box-sizing: inherit; font-family: inherit; font-weight: 700;">sudo</span></code>: MSYS2 doesn't provide it. See <a class="au kh" href="https://superuser.com/questions/122418/theres-no-sudo-command-in-cygwin" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank">this question</a> or <a class="au kh" href="https://github.com/imachug/win-sudo" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank">imachug/win-sudo</a>.</p></blockquote><h1 class="kp kq ii bn kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh li lj lk ll lm gj" data-selectable-paragraph="" id="0925" style="box-sizing: inherit; color: #292929; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 22px; letter-spacing: 0px; line-height: 28px; margin: 3.14em 0px -0.37em;">Git for Windows</h1><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="2fc5" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">Now let’s install GfW to MSYS2. Most of the instructions come from <a class="au kh" href="https://github.com/git-for-windows/git/wiki/Install-inside-MSYS2-proper" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank">this wiki page</a> but I had to customize it a bit (it seems that the wiki page sets up the full SDK environment).</p><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="f64d" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">First, edit <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">C:\msys64\etc\pacman.conf</code> and add this:</p><pre class="mg mh mi mj ga mk bt ml" style="background: rgb(242, 242, 242); box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"><span class="gj mm kq ii kg b do mn mo l mp" data-selectable-paragraph="" id="a26b" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; white-space: pre-wrap;">[git-for-windows]<br style="box-sizing: inherit;" />Server = <a class="au kh" href="https://wingit.blob.core.windows.net/x86-64" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank">https://wingit.blob.core.windows.net/x86-64</a></span></pre><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="8068" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">It needs to be the first repository, above <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">[mingw32]</code>, so that packages from it are installed first.</p><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="1f82" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">Authorize a signing key:</p><pre class="mg mh mi mj ga mk bt ml" style="background: rgb(242, 242, 242); box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"><span class="gj mm kq ii kg b do mn mo l mp" data-selectable-paragraph="" id="cd29" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; white-space: pre-wrap;">curl -L https://raw.githubusercontent.com/git-for-windows/build-extra/master/git-for-windows-keyring/git-for-windows.gpg |<br style="box-sizing: inherit;" />pacman-key --add - &&<br style="box-sizing: inherit;" />pacman-key --lsign-key 1A9F3986</span></pre><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="f4cc" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">Now update the installation with the new repository in place:</p><pre class="mg mh mi mj ga mk bt ml" style="background: rgb(242, 242, 242); box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"><span class="gj mm kq ii kg b do mn mo l mp" data-selectable-paragraph="" id="7180" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; white-space: pre-wrap;">pacman -Syu</span></pre><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="496f" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">This will guide you through installing a newer msys2 runtime. You will have to exit the terminal entirely and run the update command again, as before. Repeat <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">pacman -Syu</code> until there are no more things to update.</p><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="6d8a" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">Now install Git for Windows:</p><blockquote class="ki kj kk" style="box-shadow: rgb(41, 41, 41) 3px 0px 0px 0px inset; box-sizing: inherit; margin: 0px 0px 0px -20px; padding-left: 23px;"><p class="jf jg kl jh b ji jj jk jl jm jn jo jp km jr js jt kn jv jw jx ko jz ka kb kc ib gj" data-selectable-paragraph="" id="5e1e" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; font-style: italic; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;"><code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15.75px; padding: 2px 4px;">pacboy</code> is used here. It is a small wrapper that saves some typing, for example, <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15.75px; padding: 2px 4px;">pacboy sync git:x</code> is equivalent to <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15.75px; padding: 2px 4px;">pacman -S mingw-w64-x86_64-git</code> (the ":x" means we want the x64 version).</p></blockquote><pre class="mg mh mi mj ga mk bt ml" style="background: rgb(242, 242, 242); box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"><span class="gj mm kq ii kg b do mn mo l mp" data-selectable-paragraph="" id="6f6e" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; white-space: pre-wrap;">pacboy sync git:x git-credential-manager:x git-lfs:x git-doc-html:x git-doc-man:x</span></pre><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="3772" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">Verify that everything is working:</p><pre class="mg mh mi mj ga mk bt ml" style="background: rgb(242, 242, 242); box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"><span class="gj mm kq ii kg b do mn mo l mp" data-selectable-paragraph="" id="f034" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; white-space: pre-wrap;">$ git --version<br style="box-sizing: inherit;" />git version 2.18.0.windows.1</span><span class="gj mm kq ii kg b do mr ms mt mu mv mo l mp" data-selectable-paragraph="" id="5ffb" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: 1.91em; white-space: pre-wrap;">$ git config --list --show-origin<br style="box-sizing: inherit;" /># ... verifies that your ~/.gitconfig is read</span></pre><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="4998" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">You should be able to pull from GitHub, credential helper should store your HTTPS password, all should be working as expected.</p><h1 class="kp kq ii bn kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh li lj lk ll lm gj" data-selectable-paragraph="" id="64ca" style="box-sizing: inherit; color: #292929; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 22px; letter-spacing: 0px; line-height: 28px; margin: 3.14em 0px -0.37em;">Update Windows path</h1><p class="pw-post-body-paragraph jf jg ii jh b ji ln jk jl jm lo jo jp jq lp js jt ju lq jw jx jy lr ka kb kc ib gj" data-selectable-paragraph="" id="6e1f" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 0.86em 0px -0.46em; word-break: break-word;">To make Git and other tools like <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">cp</code> or <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">rm -rf</code> available also in <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">cmd.exe</code> and other shells, add this to your PATH in this order (I recommend system PATH which is loaded first):</p><pre class="mg mh mi mj ga mk bt ml" style="background: rgb(242, 242, 242); box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"><span class="gj mm kq ii kg b do mn mo l mp" data-selectable-paragraph="" id="a17f" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; white-space: pre-wrap;">C:\msys64\mingw64\bin<br style="box-sizing: inherit;" />C:\msys64\usr\bin</span></pre><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="6239" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">Verify:</p><pre class="mg mh mi mj ga mk bt ml" style="background: rgb(242, 242, 242); box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"><span class="gj mm kq ii kg b do mn mo l mp" data-selectable-paragraph="" id="0ca7" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; white-space: pre-wrap;">Microsoft Windows [Version 10.0.17134.112]<br style="box-sizing: inherit;" />(c) 2018 Microsoft Corporation. All rights reserved.</span><span class="gj mm kq ii kg b do mr ms mt mu mv mo l mp" data-selectable-paragraph="" id="33ce" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: 1.91em; white-space: pre-wrap;">C:\Users\Borek>git --version<br style="box-sizing: inherit;" />git version 2.18.0.windows.1</span><span class="gj mm kq ii kg b do mr ms mt mu mv mo l mp" data-selectable-paragraph="" id="9945" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: 1.91em; white-space: pre-wrap;">C:\Users\Borek>ls -la<br style="box-sizing: inherit;" />...</span></pre><h1 class="kp kq ii bn kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh li lj lk ll lm gj" data-selectable-paragraph="" id="018f" style="box-sizing: inherit; color: #292929; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 22px; letter-spacing: 0px; line-height: 28px; margin: 3.14em 0px -0.37em;">Zsh</h1><p class="pw-post-body-paragraph jf jg ii jh b ji ln jk jl jm lo jo jp jq lp js jt ju lq jw jx jy lr ka kb kc ib gj" data-selectable-paragraph="" id="ca61" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 0.86em 0px -0.46em; word-break: break-word;">Finally, zsh! Let’s install it:</p><pre class="mg mh mi mj ga mk bt ml" style="background: rgb(242, 242, 242); box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"><span class="gj mm kq ii kg b do mn mo l mp" data-selectable-paragraph="" id="b2ce" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; white-space: pre-wrap;">pacman -S zsh</span></pre><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="a65d" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">ConEmu task is similar to what we created before, just with <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">zsh.exe</code> instead of <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">bash.exe</code>. This is my <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">{MSYS2:zsh}</code> task:</p><pre class="mg mh mi mj ga mk bt ml" style="background: rgb(242, 242, 242); box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"><span class="gj mm kq ii kg b do mn mo l mp" data-selectable-paragraph="" id="1982" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; white-space: pre-wrap;">set CHERE_INVOKING=1 & set MSYSTEM=MINGW64 & set MSYS2_PATH_TYPE=inherit & set “PATH=%ConEmuDrive%\msys64\mingw64\bin;%ConEmuDrive%\msys64\usr\bin;%PATH%” & %ConEmuBaseDirShort%\conemu-msys2–64.exe -new_console:p %ConEmuDrive%\msys64\usr\bin\zsh.exe — login -i -new_console:C:”%ConEmuDrive%\msys64\msys2.ico”</span></pre><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="6b56" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;"><a class="au kh" href="https://dzone.com/articles/install-oh-my-zsh-on-windows-with-conemu" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank">This article</a> has an example of a ConEmu task that builds on mintty but I think that <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">conemu-msys2-64.exe</code> is the preferred way, see <a class="au kh" href="https://conemu.github.io/en/CygwinMsysConnector.html" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank">here</a>.</p><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="870f" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">At this point, zsh is technically working but still needs some love.</p><h1 class="kp kq ii bn kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh li lj lk ll lm gj" data-selectable-paragraph="" id="b714" style="box-sizing: inherit; color: #292929; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 22px; letter-spacing: 0px; line-height: 28px; margin: 3.14em 0px -0.37em;">Oh My Zsh</h1><p class="pw-post-body-paragraph jf jg ii jh b ji ln jk jl jm lo jo jp jq lp js jt ju lq jw jx jy lr ka kb kc ib gj" data-selectable-paragraph="" id="6b17" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 0.86em 0px -0.46em; word-break: break-word;">While <a class="au kh" href="https://github.com/robbyrussell/oh-my-zsh" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank">omz</a> feels a bit bloated to me (for example, enabling its <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">git</code> plugin registers about a <a class="au kh" href="https://github.com/robbyrussell/oh-my-zsh/wiki/Plugin:git" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank">million aliases</a>), it is also easy to appreciate its value once you don’t have it. So I like to enable omz to get all the useful stuff it has in its <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;"><a class="au kh" href="https://github.com/robbyrussell/oh-my-zsh/tree/master/lib" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank">lib</a></code><a class="au kh" href="https://github.com/robbyrussell/oh-my-zsh/tree/master/lib" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank"> folder</a> but don’t enable any plugins or themes.</p><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="de1b" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">My preferred way to install omz and other things is via <a class="au kh" href="https://github.com/zsh-users/antigen" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank">Antigen</a>. As a start, add this to your <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">.zshrc</code>:</p><blockquote class="ki kj kk" style="box-shadow: rgb(41, 41, 41) 3px 0px 0px 0px inset; box-sizing: inherit; margin: 0px 0px 0px -20px; padding-left: 23px;"><p class="jf jg kl jh b ji jj jk jl jm jn jo jp km jr js jt kn jv jw jx ko jz ka kb kc ib gj" data-selectable-paragraph="" id="89d6" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 21px; font-style: italic; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">Actually, my <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15.75px; padding: 2px 4px;">~/.zshrc</code> just sources <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15.75px; padding: 2px 4px;">$HOME/GDrive/Settings/zsh/.zshrc</code> so that it’s synced between computers. I'll probably switch to a versioned dotfiles approach soon.</p></blockquote><pre class="mg mh mi mj ga mk bt ml" style="background: rgb(242, 242, 242); box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"><span class="gj mm kq ii kg b do mn mo l mp" data-selectable-paragraph="" id="0c15" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; white-space: pre-wrap;"># Use the path where you installed Antigen<br style="box-sizing: inherit;" />source "${funcsourcetrace[1]%/*}/antigen.zsh"</span><span class="gj mm kq ii kg b do mr ms mt mu mv mo l mp" data-selectable-paragraph="" id="1778" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: 1.91em; white-space: pre-wrap;"># Load Oh My Zsh<br style="box-sizing: inherit;" />antigen use oh-my-zsh</span><span class="gj mm kq ii kg b do mr ms mt mu mv mo l mp" data-selectable-paragraph="" id="7619" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: 1.91em; white-space: pre-wrap;"># Example of how to add other useful things<br style="box-sizing: inherit;" />antigen bundle zsh-users/zsh-completions</span><span class="gj mm kq ii kg b do mr ms mt mu mv mo l mp" data-selectable-paragraph="" id="2da4" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: 1.91em; white-space: pre-wrap;">antigen apply</span></pre><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="1429" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">Some other essential things for me in <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">.zshrc</code> are:</p><pre class="mg mh mi mj ga mk bt ml" style="background: rgb(242, 242, 242); box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"><span class="gj mm kq ii kg b do mn mo l mp" data-selectable-paragraph="" id="461e" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; white-space: pre-wrap;"># Make /c/... autocompletion work, see Alexpux/MSYS2-packages#38<br style="box-sizing: inherit;" />zstyle ':completion:*' fake-files /: '/:c'</span><span class="gj mm kq ii kg b do mr ms mt mu mv mo l mp" data-selectable-paragraph="" id="0be7" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: 1.91em; white-space: pre-wrap;"># Convenient path navigation, e.g., `cd vp`<br style="box-sizing: inherit;" />setopt CDABLE_VARS<br style="box-sizing: inherit;" />vp="/c/Dev/VersionPress/versionpress"<br style="box-sizing: inherit;" />temp="/c/Dev/temp"</span><span class="gj mm kq ii kg b do mr ms mt mu mv mo l mp" data-selectable-paragraph="" id="7d84" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: 1.91em; white-space: pre-wrap;"># VSCode as an editor<br style="box-sizing: inherit;" />if [[ -n $SSH_CONNECTION ]]; then<br style="box-sizing: inherit;" /> export EDITOR='vim'<br style="box-sizing: inherit;" />else<br style="box-sizing: inherit;" /> export EDITOR='code-insiders --wait'<br style="box-sizing: inherit;" />fi</span></pre><h1 class="kp kq ii bn kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh li lj lk ll lm gj" data-selectable-paragraph="" id="99a9" style="box-sizing: inherit; color: #292929; font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 22px; letter-spacing: 0px; line-height: 28px; margin: 3.14em 0px -0.37em;">Prompt</h1><p class="pw-post-body-paragraph jf jg ii jh b ji ln jk jl jm lo jo jp jq lp js jt ju lq jw jx jy lr ka kb kc ib gj" data-selectable-paragraph="" id="4236" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 0.86em 0px -0.46em; word-break: break-word;">The grand finale!</p><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="81c0" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">There are million zsh prompts out there but as expected, none is <em class="kl" style="box-sizing: inherit;">quite</em> perfect. I want a couple of key things from a prompt:</p><ol style="box-sizing: inherit; list-style: none none; margin: 0px; padding: 0px;"><li class="ls lt ii jh b ji jj jm jn jq lu ju lv jy lw kc mq ly lz ma gj" data-selectable-paragraph="" id="dd3c" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 28px; list-style-type: decimal; margin-bottom: -0.46em; margin-left: 30px; margin-top: 2.14em; padding-left: 0px;">It should be simple, like <a class="au kh" href="https://github.com/sindresorhus/pure" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank">Pure</a>.</li><li class="ls lt ii jh b ji mb jm mc jq md ju me jy mf kc mq ly lz ma gj" data-selectable-paragraph="" id="1a42" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 28px; list-style-type: decimal; margin-bottom: -0.46em; margin-left: 30px; margin-top: 1.14em; padding-left: 0px;">It must be asynchronous so that querying Git info doesn’t block the actual work.</li></ol><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="894a" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">The second point is relatively hard to fulfill on Windows as most async prompts (incl. Pure) depend on <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">zsh-async</code> which depends on <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">zsh/zpty</code> which doesn't work in MSYS2 (until some fallback is implemented, see <a class="au kh" href="https://github.com/mafredri/zsh-async/issues/26" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank">mafredri/zsh-async#26</a>).</p><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="415e" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">The only async prompt I found working on Windows is <a class="au kh" href="https://github.com/agkozak/agkozak-zsh-theme" rel="noopener ugc nofollow" style="-webkit-tap-highlight-color: transparent; box-sizing: inherit;" target="_blank">agkozak/agkozak-zsh-theme</a> (awesome work!). I didn’t like some specifics about it, e.g., Git info being in the right prompt, so I have my own small fork of it (<em class="kl" style="box-sizing: inherit;">no</em> prompt I saw thus far is truly customizable without forking; makes me sad). In my <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">.zshrc</code>:</p><pre class="mg mh mi mj ga mk bt ml" style="background: rgb(242, 242, 242); box-sizing: inherit; margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"><span class="gj mm kq ii kg b do mn mo l mp" data-selectable-paragraph="" id="aaed" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; white-space: pre-wrap;">antigen theme borekb/agkozak-zsh-theme@prompt-customization</span></pre><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="11b7" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">It looks like this:</p><figure class="mg mh mi mj ga mx fo fp paragraph-image" style="box-sizing: inherit; clear: both; margin: 56px auto 0px;"><div class="my mz dq na cf nb" role="button" style="box-sizing: inherit; cursor: zoom-in; position: relative; width: 692px; z-index: auto;" tabindex="0"><div class="fo fp mw" style="box-sizing: inherit; margin-left: auto; margin-right: auto; max-width: 730px;"><img alt="" class="cf nc nd" height="405" loading="lazy" role="presentation" src="https://miro.medium.com/max/1400/0*20aB0lcej8n6bNNB.png" style="box-sizing: inherit; height: auto; max-width: 100%; vertical-align: middle; width: 692px;" width="700" /></div></div></figure><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="ef3f" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">What you cannot see in a static image is how the Git info is loaded in the background; it is really really cool.</p></div><div class="o dz ne nf hn ng" role="separator" style="background-color: white; box-sizing: inherit; color: rgba(0, 0, 0, 0.8); display: flex; font-family: medium-content-sans-serif-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; justify-content: center; margin-bottom: 14px; margin-top: 32px; padding-bottom: 10px; padding-top: 24px;"><span class="nh ge cj ni nj nk" style="background-color: #080808; border-radius: 50%; box-sizing: inherit; display: inline-block; height: 3px; margin-right: 20px; width: 3px;"></span><span class="nh ge cj ni nj nk" style="background-color: #080808; border-radius: 50%; box-sizing: inherit; display: inline-block; height: 3px; margin-right: 20px; width: 3px;"></span><span class="nh ge cj ni nj" style="background-color: #080808; border-radius: 50%; box-sizing: inherit; display: inline-block; height: 3px; width: 3px;"></span></div><div class="ib ic id ie if" style="background-color: white; box-sizing: inherit; color: rgba(0, 0, 0, 0.8); font-family: medium-content-sans-serif-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; overflow-wrap: break-word; word-break: break-word;"><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="f8b9" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">Ok, that’s it, we now have a fully working environment with MSYS2, zsh, Oh My Zsh, Git for Windows and Pacman where adding new packages is as simple as <code class="gi kd ke kf kg b" style="background-color: #f2f2f2; box-sizing: inherit; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 15px; padding: 2px 4px;">pacman -S <something></code>. This is the best setup I found so far, if you have any tips please let me know in the comments below.</p><p class="pw-post-body-paragraph jf jg ii jh b ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc ib gj" data-selectable-paragraph="" id="ef79" style="box-sizing: inherit; color: #292929; font-family: charter, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 20px; letter-spacing: -0.003em; line-height: 32px; margin: 2em 0px -0.46em; word-break: break-word;">And big thanks to all the people involved in MSYS2 & Git for Windows projects, you make the life of a developer on Windows bearable!</p></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7376522.post-79167798776772429822022-06-01T12:29:00.003-03:002022-06-01T12:29:22.157-03:00Windows admin password<p><br /></p><p> Reset Your Forgotten Windows 10 Password with Freeware</p><p><a href="https://pogostick.net/~pnh/ntpasswd/">https://pogostick.net/~pnh/ntpasswd/</a></p><p><br /></p><p><br /></p><p><a href="https://youtu.be/4MEURdC8o8Y">https://youtu.be/4MEURdC8o8Y</a><br /></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7376522.post-49805458072826604212022-05-24T14:20:00.000-03:002022-05-24T14:20:03.359-03:00taskbar icons error or generic on windows 11 - Rebuild the Icon Cache <p> <a href="https://www.tenforums.com/tutorials/5645-rebuild-icon-cache-windows-10-a.html">https://www.tenforums.com/tutorials/5645-rebuild-icon-cache-windows-10-a.html</a></p><p><br /></p><p><br /></p><div style="background-color: white; color: #3e3e3e; font-family: "open sans", "segoe ui", Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: large; font-weight: bold; margin: 0px; overflow: hidden; padding: 0px;"><h2 class="bbopt3" style="background-color: #e9e9e9; border-bottom: 4px solid rgb(1, 103, 175); font-size: 22.158px; margin: 0px !important; padding: 0px 0px 3px 5px;">To Rebuild the Icon Cache in the Command Prompt</h2></div><div style="background-color: white; color: #3e3e3e; font-family: "open sans", "segoe ui", Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 15px; margin: 0px 0px 0px 40px; padding: 0px;"><br /><span class="bbnum" style="background-color: #0167af; border-radius: 0px; color: white; display: inline-block; height: 30px; line-height: 30px; min-width: 30px; text-align: center;">1</span> Close and save anything that you are working on before proceeding. The next steps will involve killing explorer and restarting the PC.<br /><br /><span class="bbnum" style="background-color: #0167af; border-radius: 0px; color: white; display: inline-block; height: 30px; line-height: 30px; min-width: 30px; text-align: center;">2</span> Open a <a href="https://www.tenforums.com/tutorials/3288-open-command-prompt-windows-10-a.html" style="color: #417394; text-decoration-line: none;" target="_blank"><b>command prompt</b></a>.<br /><br /><span class="bbnum" style="background-color: #0167af; border-radius: 0px; color: white; display: inline-block; height: 30px; line-height: 30px; min-width: 30px; text-align: center;">3</span> Copy and paste each command below one at a time into the command prompt, and press <kbd class="bbkey1" style="background: linear-gradient(rgb(244, 244, 244), rgb(213, 213, 213)) rgb(244, 244, 244); border-radius: 6px; border: 1px solid rgb(213, 213, 213); box-shadow: rgb(213, 213, 213) 0px 1px 2px 1px; font-family: consolas, "liberation mono", courier, monospace; font-size: 0.9rem; font-weight: 700; line-height: 1; margin: 3px; padding: 4px 6px; white-space: nowrap;">Enter</kbd> after each command.<div style="margin: 0px 0px 0px 40px; padding: 0px;"><br /><code class="cs1" style="background-color: #eff1f2; border: 1px solid rgb(227, 227, 227); display: inline-block; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Courier New", monospace, sans-serif; font-style: inherit; font-weight: inherit; line-height: 16px; margin: 0px; padding: 3px 5px; white-space: pre-wrap;">ie4uinit.exe -show</code><br /><br /><code class="cs1" style="background-color: #eff1f2; border: 1px solid rgb(227, 227, 227); display: inline-block; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Courier New", monospace, sans-serif; font-style: inherit; font-weight: inherit; line-height: 16px; margin: 0px; padding: 3px 5px; white-space: pre-wrap;">taskkill /IM explorer.exe /F</code><br /><br /><code class="cs1" style="background-color: #eff1f2; border: 1px solid rgb(227, 227, 227); display: inline-block; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Courier New", monospace, sans-serif; font-style: inherit; font-weight: inherit; line-height: 16px; margin: 0px; padding: 3px 5px; white-space: pre-wrap;">DEL /A /Q "%localappdata%\IconCache.db"</code><br /><br /><code class="cs1" style="background-color: #eff1f2; border: 1px solid rgb(227, 227, 227); display: inline-block; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Courier New", monospace, sans-serif; font-style: inherit; font-weight: inherit; line-height: 16px; margin: 0px; padding: 3px 5px; white-space: pre-wrap;">DEL /A /F /Q "%localappdata%\Microsoft\Windows\Explorer\iconcache*"</code><br /><br /><code class="cs1" style="background-color: #eff1f2; border: 1px solid rgb(227, 227, 227); display: inline-block; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Courier New", monospace, sans-serif; font-style: inherit; font-weight: inherit; line-height: 16px; margin: 0px; padding: 3px 5px; white-space: pre-wrap;">shutdown /r /f /t 00</code><br /><br /><p class="w2" style="background-color: #feebef; border-left: 3px solid rgb(255, 198, 198); margin: 0px 0px 1em; overflow: hidden; padding: 4px 12px 4px 32px;">This last command will instantly restart the computer.</p></div><span class="bbnum" style="background-color: #0167af; border-radius: 0px; color: white; display: inline-block; height: 30px; line-height: 30px; min-width: 30px; text-align: center;">4</span> If the icons are still not displaying properly after rebuilding the icon cache, then download and merge the .reg file for the <b>.ico</b> (ICO) option <a href="https://www.tenforums.com/tutorials/8703-restore-default-file-type-associations-windows-10-a.html#option2" style="color: #417394; text-decoration-line: none;" target="_blank"><b>here</b></a> to restore the default associations of .ico (icon) files in Windows 10.</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7376522.post-70137930011765942012022-05-13T10:54:00.007-03:002022-05-13T10:54:56.529-03:00Access workstations without public IP - maybe with VPN<p> Solutions I found, no test , just googled<span> </span></p><p><span><br /></span></p><p><a href="http://neorouter.com/">http://neorouter.com/</a></p><p><a href="https://www.zerotier.com/">https://www.zerotier.com/</a></p><p></p><p><a href="https://portmap.io/">https://portmap.io/</a></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7376522.post-65654284135757249162022-03-29T11:14:00.003-03:002022-03-29T11:14:21.759-03:00Run Google Chrome with different profiles in Windows<p><a href="https://winaero.com/run-google-chrome-with-different-profiles/">https://winaero.com/run-google-chrome-with-different-profiles/</a><br /></p><p><br /></p><p> <span style="background-color: white; color: #1a1a1a; font-family: Merriweather, Georgia, serif; font-size: 16px;">Chrome for Windows 10 supports the mentioned command line argument, --profile-directory. Use it as follows:</span></p><pre style="background-color: white; border: 1px solid rgb(209, 209, 209); box-sizing: inherit; color: #1a1a1a; font-family: Inconsolata, monospace; font-size: 16px; line-height: 1.3125; margin-bottom: 1.75em; margin-top: 0px; max-width: 100%; overflow-wrap: break-word; overflow: auto; padding: 1.75em; white-space: pre-wrap;">chrome.exe --profile-directory="profile name"</pre><ol style="background-color: white; box-sizing: inherit; color: #1a1a1a; font-family: Merriweather, Georgia, serif; font-size: 16px; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1.75em; overflow-wrap: break-word; padding: 0px;"><li style="box-sizing: inherit;">Duplicate your existing Chrome shortcut. For example, select it on the Desktop, press <kbd style="background: none 0% 0% repeat scroll rgb(221, 221, 221); border: 0.15em outset rgb(255, 255, 255); box-sizing: inherit; display: inline-block; font-family: inherit; font-size: 0.85em; line-height: 1.5em; min-width: 1em; outline: rgb(187, 187, 187) solid 1px; padding: 0.2em 0.3em; text-align: center; white-space: nowrap;">Ctrl</kbd> + <kbd style="background: none 0% 0% repeat scroll rgb(221, 221, 221); border: 0.15em outset rgb(255, 255, 255); box-sizing: inherit; display: inline-block; font-family: inherit; font-size: 0.85em; line-height: 1.5em; min-width: 1em; outline: rgb(187, 187, 187) solid 1px; padding: 0.2em 0.3em; text-align: center; white-space: nowrap;">C</kbd> to copy it, then press <kbd style="background: none 0% 0% repeat scroll rgb(221, 221, 221); border: 0.15em outset rgb(255, 255, 255); box-sizing: inherit; display: inline-block; font-family: inherit; font-size: 0.85em; line-height: 1.5em; min-width: 1em; outline: rgb(187, 187, 187) solid 1px; padding: 0.2em 0.3em; text-align: center; white-space: nowrap;">Ctrl</kbd> + <kbd style="background: none 0% 0% repeat scroll rgb(221, 221, 221); border: 0.15em outset rgb(255, 255, 255); box-sizing: inherit; display: inline-block; font-family: inherit; font-size: 0.85em; line-height: 1.5em; min-width: 1em; outline: rgb(187, 187, 187) solid 1px; padding: 0.2em 0.3em; text-align: center; white-space: nowrap;">V</kbd> to paste. See this article: <a href="https://winaero.com/blog/how-to-create-a-copy-for-a-file-quickly-in-explorer/" style="background-color: transparent; box-shadow: currentcolor 0px 1px 0px 0px; box-sizing: inherit; color: #007acc; text-decoration-line: none;">How to create a copy for a file quickly in Explorer</a>.</li><li style="box-sizing: inherit;">Right click the shortcut you created and select Properties from the context menu.</li><li style="box-sizing: inherit;">Add the mentioned command line argument to the Target box:It will look as follows:<pre style="border: 1px solid rgb(209, 209, 209); box-sizing: inherit; font-family: Inconsolata, monospace; font-size: 1rem; line-height: 1.3125; margin-bottom: 1.75em; margin-top: 0px; max-width: 100%; overflow-wrap: break-word; overflow: auto; padding: 1.75em; white-space: pre-wrap;">chrome.exe --profile-directory="my other profile"</pre><p style="box-sizing: inherit; margin: 0px 0px 1.75em; overflow-wrap: break-word;">Correct the profile name according to your preferences.</p></li><li style="box-sizing: inherit;">Repeat these steps for all profiles you need to create and you are done.</li></ol><p style="background-color: white; box-sizing: inherit; color: #1a1a1a; font-family: Merriweather, Georgia, serif; font-size: 16px; margin: 0px 0px 1.75em; overflow-wrap: break-word;">Now, you can run different Chrome profiles using shortcuts you created simultaneously.</p><h2 id="toc_3" style="background-color: white; box-sizing: inherit; clear: both; color: #1a1a1a; font-family: Merriweather, Georgia, serif; font-size: 1.75rem; line-height: 1.25; margin: 2em 0px 1em; overflow-wrap: break-word; text-rendering: optimizelegibility;"><span id="Run_Google_Chrome_with_different_profiles_on_Linux" style="box-sizing: inherit;">Run Google Chrome with different profiles on Linux</span></h2><p style="background-color: white; box-sizing: inherit; color: #1a1a1a; font-family: Merriweather, Georgia, serif; font-size: 16px; margin: 0px 0px 1.75em; overflow-wrap: break-word;">In Linux, you can create a special *.desktop file to launch the Chrome browser with an alternative profile. Do it as follows.</p><ol style="background-color: white; box-sizing: inherit; color: #1a1a1a; font-family: Merriweather, Georgia, serif; font-size: 16px; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1.75em; overflow-wrap: break-word; padding: 0px;"><li style="box-sizing: inherit;">Open the following folder with your favorite file manager:<pre style="border: 1px solid rgb(209, 209, 209); box-sizing: inherit; font-family: Inconsolata, monospace; font-size: 1rem; line-height: 1.3125; margin-bottom: 1.75em; margin-top: 0px; max-width: 100%; overflow-wrap: break-word; overflow: auto; padding: 1.75em; white-space: pre-wrap;">/usr/share/applications</pre><p style="box-sizing: inherit; margin: 0px 0px 1.75em; overflow-wrap: break-word;"><br /></p></li><li style="box-sizing: inherit;">Find a file named "google-chrome.desktop" there.</li><li style="box-sizing: inherit;">Copy that file to the folder<pre style="border: 1px solid rgb(209, 209, 209); box-sizing: inherit; font-family: Inconsolata, monospace; font-size: 1rem; line-height: 1.3125; margin-bottom: 1.75em; margin-top: 0px; max-width: 100%; overflow-wrap: break-word; overflow: auto; padding: 1.75em; white-space: pre-wrap;">/home/your user name/.local/share/applications</pre><p style="box-sizing: inherit; margin: 0px 0px 1.75em; overflow-wrap: break-word;">If you don't have such a folder, then just create it.</p></li><li style="box-sizing: inherit;">Rename the ~/.local/share/applications/google-chrome.desktop file to something else to indicate that it will refer to a custom profile.</li><li style="box-sizing: inherit;">Edit it with your favorite editor. Change the Name section to something like Google Chrome (My Profile):</li><li style="box-sizing: inherit;">Change all the Exec sections in the file to make them look like this:<pre style="border: 1px solid rgb(209, 209, 209); box-sizing: inherit; font-family: Inconsolata, monospace; font-size: 1rem; line-height: 1.3125; margin-bottom: 1.75em; margin-top: 0px; max-width: 100%; overflow-wrap: break-word; overflow: auto; padding: 1.75em; white-space: pre-wrap;">/usr/bin/google-chrome-stable --profile-directory="my other profile" %U</pre><p style="box-sizing: inherit; margin: 0px 0px 1.75em; overflow-wrap: break-word;">So, you need to add the --profile-directory parameter to Chrome's command line.</p></li><li style="box-sizing: inherit;">Repeat these steps for all profiles you need to create and you are done.</li></ol><p style="background-color: white; box-sizing: inherit; color: #1a1a1a; font-family: Merriweather, Georgia, serif; font-size: 16px; margin: 0px 0px 1.75em; overflow-wrap: break-word;">Your custom profiles will be visible in the apps menu of your Desktop environment. Here is how it looks in my XFCE+Whisker menu plugin:</p><p style="background-color: white; box-sizing: inherit; color: #1a1a1a; font-family: Merriweather, Georgia, serif; font-size: 16px; margin: 0px 0px 1.75em; overflow-wrap: break-word;">That's it.</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7376522.post-8455797435403182522022-03-18T11:24:00.003-03:002022-03-18T11:24:50.559-03:00INSTALL KALI LINUX ON WINDOWS 10 – WSL 2 KEX GUI HACKING SETUP<p> Source for this is <a href="https://www.the-digital-life.com/install-kali-linux-wsl-2/">https://www.the-digital-life.com/install-kali-linux-wsl-2/</a></p><p>Please visit the souce.</p><p><br /></p><p>INSTALL KALI LINUX IN WSL 2</p><p>First, install the Windows Subsystem for Linux by executing the following two commands. Alternatively, you can also search for “Turn Windows Features on or off”. Then you click on “Windows Subsystem for Linux” and “Virtual Machine Platform”.</p><p><br /></p><p>dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart</p><p>dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart</p><p><br /></p><p>Windows want’s you to restart your PC. After you did that you can now download the WSL 2 Kernel Modules and install the package:</p><p><br /></p><p>https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi</p><p><br /></p><p>Also, don’t forget to set WSL 2 as your default version with the following command:</p><p><br /></p><p>wsl --set-default-version 2</p><p>Now, you’re ready to install Kali Linux from the Microsoft Store:</p><p><br /></p><p>https://www.microsoft.com/en-us/p/kali-linux/9pkr34tncv07?activetab=pivot:overviewtab</p><p><br /></p><p>Open the Kali Linux App, this will present you a console window, where you set up your username and password. You can also hide the welcome message by executing the following command in the terminal.</p><p><br /></p><p>touch ~/.hushlogin</p><p>MAKE YOUR TERMINAL AWESOME</p><p>Kali Linux is now installed and you can use it to configure the system. However, the default console window doesn’t look nice. To change this you should use the “Windows Terminal”, which is a nice open-source project of Microsoft. I’ve recently made a video about how to make your WSL 2 terminal look awesome in Windows by setting up the Windows Terminal with zsh and a custom template, but only with Ubuntu WSL. However, this will also work exactly the same with Kali Linux. Check out my article, if you want to know how to set up this.</p><p><br /></p><p>INSTALL KALI LINUX DESKTOP AND TOOLS WITH KEX</p><p>You should now have a cool Kali Linux terminal running in your WSL 2. But what about all the cool penetration testing tools? Because, the Kali Linux WSL version doesn’t come with any of these and doesn’t have any graphical user interface.</p><p><br /></p><p>There is a pretty easy and quick solution to set up this in WSL, that is called Kex. Let’s install this in our Kali Linux and set up a Desktop environment and install the Kali Linux tools.</p><p><br /></p><p>First, let’s update the package sources and install the newest distribution version of Kali Linux.</p><p><br /></p><p>sudo apt update && sudo apt dist-upgrade</p><p>Then, you can install the Kali Linux Kex extension.</p><p><br /></p><p>sudo apt install kali-win-kex</p><p>At least, you should also install the Kali Linux tools. There are different variants of tool-sets existing. I’ve chosen the “large” environment, so that you have all the tools.</p><p><br /></p><p>sudo apt install kali-linux-large</p><p>USE THE DESKTOP ENVIRONMENT IN KALI LINUX WSL 2</p><p>We now have all necessary tools installed and you can simply run your desktop environment in Kali Linux WSL2. There are three different modes existing and I’ll show you them one by one.</p><p><br /></p><p>WINDOW MODE WITH VNC</p><p>kex -s</p><p>WINDOW MODE WITH RDP</p><p>kex --esm -s</p><p>SEAMLESS MODE</p><p>kex --sl -s</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7376522.post-87537341440156082872022-01-10T16:24:00.001-03:002022-01-10T16:24:29.489-03:00Windows 10 Debloater<p> I've been using this one...</p><p><a href="https://github.com/ChrisTitusTech/win10script">https://github.com/ChrisTitusTech/win10script</a></p><p><br /></p><p>But worth seeing this one too.</p><p><a href="https://github.com/Sycnex/Windows10Debloater">https://github.com/Sycnex/Windows10Debloater</a><br /></p><p><br /></p><p>And don't know if one is a fork of another, and not responsible for running and risks.</p><p><br /></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7376522.post-74274947557010225922022-01-06T07:46:00.005-03:002022-01-06T07:46:38.039-03:00Write, compile and run online code... can you? Yes, Instant IDE repit.com<p>Yes, it seem to be there for a while now, <a href="https://replit.com/">https://replit.com/</a></p><p><br /></p><p>It can be used with a lot of programing languages.</p><p><br /></p><p>Check it out!</p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7376522.post-892749760149761142021-09-15T11:04:00.004-03:002021-09-15T11:04:27.471-03:00DNS Online utils dns checker<p><a href="https://dnschecker.org/">dnschecker.org</a></p><p><br /></p><p><span style="color: #212529; font-family: Arial, sans-serif; font-size: 1.25rem;">More Tools</span></p><div class="p-0 col-lg-12 mt-3 hide" id="mTools_links" style="box-sizing: border-box; color: #212529; flex: 0 0 100%; font-family: Arial, sans-serif; font-size: 14px; margin-top: 1rem !important; max-width: 100%; padding: 0px !important; position: relative; width: 1172.33px;"><a class="related-links-href d-block d-lg-inline-block mt-1 mt-lg-2 mr-lg-2 px-2 py-1 icon-hover-white" href="https://dnschecker.org/whats-my-ip-address.php" style="background-color: #f8f8f8; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #333333; display: inline-block !important; margin-right: 0.5rem !important; margin-top: 0.5rem !important; padding: 0.25rem 0.5rem !important; text-decoration-line: none !important;"><i class="mr-1 valign-middle icon-black icon icon-question-mark-circle" style="-webkit-mask-image: url("../images/icons/question-mark-circle.svg"); -webkit-mask-position: center center; -webkit-mask-repeat: no-repeat; -webkit-mask-size: cover; background-color: var(--black); box-sizing: border-box; display: inline-block; height: calc(1em + 1px); margin-right: 0.25rem !important; vertical-align: middle !important; width: calc(1em + 1px);"></i>What is my IP Address</a><a class="related-links-href d-block d-lg-inline-block mt-1 mt-lg-2 mr-lg-2 px-2 py-1 icon-hover-white" href="https://dnschecker.org/dns-record-validation.php" style="background-color: #f8f8f8; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #333333; display: inline-block !important; margin-right: 0.5rem !important; margin-top: 0.5rem !important; padding: 0.25rem 0.5rem !important; text-decoration-line: none !important;"><i class="mr-1 valign-middle icon-black icon icon-lg-2 icon-approval" style="-webkit-mask-image: url("../images/icons/approval.svg"); -webkit-mask-position: center center; -webkit-mask-repeat: no-repeat; -webkit-mask-size: cover; background-color: var(--black); box-sizing: border-box; display: inline-block; height: calc(1em + 4px); margin-right: 0.25rem !important; vertical-align: middle !important; width: calc(1em + 4px);"></i>Domain DNS Validation</a><a class="related-links-href d-block d-lg-inline-block mt-1 mt-lg-2 mr-lg-2 px-2 py-1 icon-hover-white" href="https://dnschecker.org/password-strength-checker.php" style="background-color: #f8f8f8; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #333333; display: inline-block !important; margin-right: 0.5rem !important; margin-top: 0.5rem !important; padding: 0.25rem 0.5rem !important; text-decoration-line: none !important;"><i class="mr-1 valign-middle icon-black icon icon-lock" style="-webkit-mask-image: url("../images/icons/lock.svg"); -webkit-mask-position: center center; -webkit-mask-repeat: no-repeat; -webkit-mask-size: cover; background-color: var(--black); box-sizing: border-box; display: inline-block; height: calc(1em + 1px); margin-right: 0.25rem !important; vertical-align: middle !important; width: calc(1em + 1px);"></i>Password Strength Checker</a><a class="related-links-href d-block d-lg-inline-block mt-1 mt-lg-2 mr-lg-2 px-2 py-1 icon-hover-white" href="https://dnschecker.org/ipv6-compatibility-checker.php" style="background-color: #f8f8f8; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #333333; display: inline-block !important; margin-right: 0.5rem !important; margin-top: 0.5rem !important; padding: 0.25rem 0.5rem !important; text-decoration-line: none !important;"><i class="mr-1 valign-middle icon-black icon icon-question-mark-circle" style="-webkit-mask-image: url("../images/icons/question-mark-circle.svg"); -webkit-mask-position: center center; -webkit-mask-repeat: no-repeat; -webkit-mask-size: cover; background-color: var(--black); box-sizing: border-box; display: inline-block; height: calc(1em + 1px); margin-right: 0.25rem !important; vertical-align: middle !important; width: calc(1em + 1px);"></i>IPv6 Compatibility Checker</a><a class="related-links-href d-block d-lg-inline-block mt-1 mt-lg-2 mr-lg-2 px-2 py-1 icon-hover-white" href="https://dnschecker.org/open-graph-preview-generate-metatags.php" style="background-color: #f8f8f8; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #333333; display: inline-block !important; margin-right: 0.5rem !important; margin-top: 0.5rem !important; padding: 0.25rem 0.5rem !important; text-decoration-line: none !important;"><i class="mr-1 valign-middle icon-black icon icon-tags" style="-webkit-mask-image: url("../images/icons/tags.svg"); -webkit-mask-position: center center; -webkit-mask-repeat: no-repeat; -webkit-mask-size: cover; background-color: var(--black); box-sizing: border-box; display: inline-block; height: calc(1em + 1px); margin-right: 0.25rem !important; vertical-align: middle !important; width: calc(1em + 1px);"></i>Open Graph Generator</a><a class="related-links-href d-block d-lg-inline-block mt-1 mt-lg-2 mr-lg-2 px-2 py-1 icon-hover-white" href="https://dnschecker.org/pagerank.php" style="background-color: #f8f8f8; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #333333; display: inline-block !important; margin-right: 0.5rem !important; margin-top: 0.5rem !important; padding: 0.25rem 0.5rem !important; text-decoration-line: none !important;"><i class="mr-1 valign-middle icon-black icon icon-google" style="-webkit-mask-image: url("../images/icons/google.svg"); -webkit-mask-position: center center; -webkit-mask-repeat: no-repeat; -webkit-mask-size: cover; background-color: var(--black); box-sizing: border-box; display: inline-block; height: calc(1em + 1px); margin-right: 0.25rem !important; vertical-align: middle !important; width: calc(1em + 1px);"></i>Check Google Page Rank</a><a class="related-links-href d-block d-lg-inline-block mt-1 mt-lg-2 mr-lg-2 px-2 py-1 icon-hover-white" href="https://dnschecker.org/website-broken-link-checker.php" style="background-color: #f8f8f8; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #333333; display: inline-block !important; margin-right: 0.5rem !important; margin-top: 0.5rem !important; padding: 0.25rem 0.5rem !important; text-decoration-line: none !important;"><i class="mr-1 valign-middle icon-black icon icon-broken-link" style="-webkit-mask-image: url("../images/icons/broken-link.svg"); -webkit-mask-position: center center; -webkit-mask-repeat: no-repeat; -webkit-mask-size: cover; background-color: var(--black); box-sizing: border-box; display: inline-block; height: calc(1em + 1px); margin-right: 0.25rem !important; vertical-align: middle !important; width: calc(1em + 1px);"></i>Broken Links Checker</a><a class="related-links-href d-block d-lg-inline-block mt-1 mt-lg-2 mr-lg-2 px-2 py-1 icon-hover-white" href="https://dnschecker.org/email-header-analyzer.php" style="background-color: #f8f8f8; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #333333; display: inline-block !important; margin-right: 0.5rem !important; margin-top: 0.5rem !important; padding: 0.25rem 0.5rem !important; text-decoration-line: none !important;"><i class="mr-1 valign-middle icon-black icon icon-envelope" style="-webkit-mask-image: url("../images/icons/envelope.svg"); -webkit-mask-position: center center; -webkit-mask-repeat: no-repeat; -webkit-mask-size: cover; background-color: var(--black); box-sizing: border-box; display: inline-block; height: calc(1em + 1px); margin-right: 0.25rem !important; vertical-align: middle !important; width: calc(1em + 1px);"></i>Trace Email (Header Analyzer)</a><a class="related-links-href d-block d-lg-inline-block mt-1 mt-lg-2 mr-lg-2 px-2 py-1 icon-hover-white" href="https://dnschecker.org/mx-lookup.php" style="background-color: #f8f8f8; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #333333; display: inline-block !important; margin-right: 0.5rem !important; margin-top: 0.5rem !important; padding: 0.25rem 0.5rem !important; text-decoration-line: none !important;"><i class="mr-1 valign-middle icon-black icon icon-lg-4 icon-dns" style="-webkit-mask-image: url("../images/icons/dns.svg"); -webkit-mask-position: center center; -webkit-mask-repeat: no-repeat; -webkit-mask-size: cover; background-color: var(--black); box-sizing: border-box; display: inline-block; height: calc(1em + 8px); margin-right: 0.25rem !important; vertical-align: middle !important; width: calc(1em + 8px);"></i>MX Lookup</a><a class="related-links-href d-block d-lg-inline-block mt-1 mt-lg-2 mr-lg-2 px-2 py-1 icon-hover-white" href="https://dnschecker.org/domain-health-checker.php" style="background-color: #f8f8f8; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #333333; display: inline-block !important; margin-right: 0.5rem !important; margin-top: 0.5rem !important; padding: 0.25rem 0.5rem !important; text-decoration-line: none !important;"><i class="mr-1 valign-middle icon-black icon icon-stethoscope" style="-webkit-mask-image: url("../images/icons/stethoscope.svg"); -webkit-mask-position: center center; -webkit-mask-repeat: no-repeat; -webkit-mask-size: cover; background-color: var(--black); box-sizing: border-box; display: inline-block; height: calc(1em + 1px); margin-right: 0.25rem !important; vertical-align: middle !important; width: calc(1em + 1px);"></i>Domain DNS Health Checker</a><a class="related-links-href d-block d-lg-inline-block mt-1 mt-lg-2 mr-lg-2 px-2 py-1 icon-hover-white" href="https://dnschecker.org/raid-calculator.php" style="background-color: #f8f8f8; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #333333; display: inline-block !important; margin-right: 0.5rem !important; margin-top: 0.5rem !important; padding: 0.25rem 0.5rem !important; text-decoration-line: none !important;"><i class="mr-1 valign-middle icon-black icon icon-hdd-drive" style="-webkit-mask-image: url("../images/icons/hdd-drive.svg"); -webkit-mask-position: center center; -webkit-mask-repeat: no-repeat; -webkit-mask-size: cover; background-color: var(--black); box-sizing: border-box; display: inline-block; height: calc(1em + 1px); margin-right: 0.25rem !important; vertical-align: middle !important; width: calc(1em + 1px);"></i>Raid Calculator</a><a class="related-links-href d-block d-lg-inline-block mt-1 mt-lg-2 mr-lg-2 px-2 py-1 icon-hover-white" href="https://dnschecker.org/qr-code-scanner.php" style="background-color: #f8f8f8; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #333333; display: inline-block !important; margin-right: 0.5rem !important; margin-top: 0.5rem !important; padding: 0.25rem 0.5rem !important; text-decoration-line: none !important;"><i class="mr-1 valign-middle icon-black icon icon-qrcode" style="-webkit-mask-image: url("../images/icons/qrcode.svg"); -webkit-mask-position: center center; -webkit-mask-repeat: no-repeat; -webkit-mask-size: cover; background-color: var(--black); box-sizing: border-box; display: inline-block; height: calc(1em + 1px); margin-right: 0.25rem !important; vertical-align: middle !important; width: calc(1em + 1px);"></i>QR Scanner</a><a class="related-links-href d-block d-lg-inline-block mt-1 mt-lg-2 mr-lg-2 px-2 py-1 icon-hover-white" href="https://dnschecker.org/ssl-certificate-examination.php" style="background-color: #f8f8f8; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #333333; display: inline-block !important; margin-right: 0.5rem !important; margin-top: 0.5rem !important; padding: 0.25rem 0.5rem !important; text-decoration-line: none !important;"><i class="mr-1 valign-middle icon-black icon icon-lock" style="-webkit-mask-image: url("../images/icons/lock.svg"); -webkit-mask-position: center center; -webkit-mask-repeat: no-repeat; -webkit-mask-size: cover; background-color: var(--black); box-sizing: border-box; display: inline-block; height: calc(1em + 1px); margin-right: 0.25rem !important; vertical-align: middle !important; width: calc(1em + 1px);"></i>SSL Certificate Checker</a><a class="related-links-href d-block d-lg-inline-block mt-1 mt-lg-2 mr-lg-2 px-2 py-1 icon-hover-white" href="https://dnschecker.org/idn-punycode-converter.php" style="background-color: #f8f8f8; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #333333; display: inline-block !important; margin-right: 0.5rem !important; margin-top: 0.5rem !important; padding: 0.25rem 0.5rem !important; text-decoration-line: none !important;"><i class="mr-1 valign-middle icon-black icon icon-domain" style="-webkit-mask-image: url("../images/icons/domain.svg"); -webkit-mask-position: center center; -webkit-mask-repeat: no-repeat; -webkit-mask-size: cover; background-color: var(--black); box-sizing: border-box; display: inline-block; height: calc(1em + 1px); margin-right: 0.25rem !important; vertical-align: middle !important; width: calc(1em + 1px);"></i>Punycode Converter</a></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7376522.post-65109167988070129212021-06-14T20:04:00.003-03:002021-06-14T20:04:48.793-03:00Complete Switch from BASH to ZSH<p><a href=" https://christitus.com/zsh/"> https://christitus.com/zsh/</a></p><p><a href="https://github.com/romkatv/powerlevel10k">https://github.com/romkatv/powerlevel10k</a><br /></p><p style="background-color: #fafafa; box-sizing: inherit; color: #424242; font-family: muli, sans-serif, muli, avenir, "helvetica neue", helvetica, ubuntu, roboto, noto, "segoe ui", arial, sans-serif; font-size: 16px; margin: 0px 0px 1.75rem; padding: 0px;">In this article, I go over my implementation of ZSH, which is a better shell alternative to BASH.</p><h2 id="why-zsh" style="background-color: #fafafa; box-sizing: inherit; color: #607d8b; font-family: montserrat, sans-serif; font-size: 2.2rem; line-height: 1.25; margin: 3.2rem 0px 1.5rem; padding: 0px; position: relative; text-rendering: optimizelegibility;">Why ZSH?</h2><p style="background-color: #fafafa; box-sizing: inherit; color: #424242; font-family: muli, sans-serif, muli, avenir, "helvetica neue", helvetica, ubuntu, roboto, noto, "segoe ui", arial, sans-serif; font-size: 16px; margin: 0px 0px 1.75rem; padding: 0px;">ZSH is an amazing shell that just makes everything a bit easier from auto suggestions, completing tasks you do regularly considerably faster.</p><h2 id="before-you-begin-dependencies" style="background-color: #fafafa; box-sizing: inherit; color: #607d8b; font-family: montserrat, sans-serif; font-size: 2.2rem; line-height: 1.25; margin: 3.2rem 0px 1.5rem; padding: 0px; position: relative; text-rendering: optimizelegibility;">Before you Begin: Dependencies</h2><p style="background-color: #fafafa; box-sizing: inherit; color: #424242; font-family: muli, sans-serif, muli, avenir, "helvetica neue", helvetica, ubuntu, roboto, noto, "segoe ui", arial, sans-serif; font-size: 16px; margin: 0px 0px 1.75rem; padding: 0px;">I built a resource for those starting out with my Github @ <a href="https://github.com/ChrisTitusTech/zsh" style="box-sizing: inherit; color: #607d8b;">https://github.com/ChrisTitusTech/zsh</a> and will be using many files from the project.</p><p style="background-color: #fafafa; box-sizing: inherit; color: #424242; font-family: muli, sans-serif, muli, avenir, "helvetica neue", helvetica, ubuntu, roboto, noto, "segoe ui", arial, sans-serif; font-size: 16px; margin: 0px 0px 1.75rem; padding: 0px;">Packages needed before you start:</p><ul style="background-color: #fafafa; box-sizing: inherit; color: #424242; font-family: muli, sans-serif, muli, avenir, "helvetica neue", helvetica, ubuntu, roboto, noto, "segoe ui", arial, sans-serif; font-size: 16px; list-style-image: none; list-style-position: outside; margin: 0px; padding: 0px;"><li style="box-sizing: inherit; margin: 0px 0px calc(0.5rem) 2rem; padding: 0px;">zsh - ZSH Shell</li><li style="box-sizing: inherit; margin: 0px 0px calc(0.5rem) 2rem; padding: 0px;">zsh-syntax-highlighting - syntax highlighting for ZSH in standard repos</li><li style="box-sizing: inherit; margin: 0px 0px calc(0.5rem) 2rem; padding: 0px;">autojump - jump to directories with j or jc for child or jo to open in file manager</li><li style="box-sizing: inherit; margin: 0px 0px calc(0.5rem) 2rem; padding: 0px;">zsh-autosuggestions - Suggestions based on your history</li></ul><h2 id="initial-setup-of-zsh" style="background-color: #fafafa; box-sizing: inherit; color: #607d8b; font-family: montserrat, sans-serif; font-size: 2.2rem; line-height: 1.25; margin: 3.2rem 0px 1.5rem; padding: 0px; position: relative; text-rendering: optimizelegibility;">Initial Setup of ZSH</h2><div class="highlight" style="background-color: #fafafa; box-sizing: inherit; color: #424242; font-family: muli, sans-serif, muli, avenir, "helvetica neue", helvetica, ubuntu, roboto, noto, "segoe ui", arial, sans-serif; font-size: 16px; position: relative;"><div class="chroma" style="background: rgb(236, 239, 241); border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.125) 1px 1px 2px; box-sizing: inherit; color: #344952; direction: ltr; margin: 1em 0px; overflow-x: auto; position: relative; z-index: 7;"><table class="lntable" style="border-collapse: collapse; border-spacing: 0px; border: 0px; box-sizing: inherit; display: block; margin: 0px; overflow: auto; padding: 0px; width: auto;"><tbody style="box-sizing: inherit;"><tr style="border-collapse: collapse; box-sizing: inherit; margin: 0px; padding: 0px; width: 859.422px;"><td class="lntd" style="border-collapse: collapse; border: 0px; box-sizing: inherit; margin: 0px; padding: 0px; user-select: none; vertical-align: top; width: 10px;"><div class="language-code" data-lang="Code" style="box-sizing: inherit;"><pre class="chroma" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 0.34rem; box-sizing: inherit; color: #344952; direction: ltr; font-family: Consolas, Monaco, Menlo, "dejavu sans mono", "bitstream vera sans mono", "courier new", "lucida console", "lucida sans typewriter", "liberation mono", "nimbus mono l", Monaco, Courier, monospace; font-size: 13.8px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 34px 4px 6px;"><code style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 4px; box-sizing: inherit; color: #26a69a; font-family: Consolas, Monaco, Menlo, "dejavu sans mono", "bitstream vera sans mono", "courier new", "lucida console", "lucida sans typewriter", "liberation mono", "nimbus mono l", Monaco, Courier, monospace; font-size: 13.8px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; overflow: auto; padding: 0px;"><span class="lnt" style="box-sizing: inherit; color: #aaaaaa; padding: 0px 0.4em;">1
</span><span class="lnt" style="box-sizing: inherit; color: #aaaaaa; padding: 0px 0.4em;">2
</span><span class="lnt" style="box-sizing: inherit; color: #aaaaaa; padding: 0px 0.4em;">3
</span><span class="lnt" style="box-sizing: inherit; color: #aaaaaa; padding: 0px 0.4em;">4
</span></code></pre><span class="copy-to-clipboard" style="background-image: url("data:image/svg+xml;utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjRwdCIgaGVpZ2h0PSIyNHB0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPlxhPHBhdGggc3R5bGU9InN0cm9rZTpub25lO2ZpbGwtcnVsZTpub256ZXJvO2ZpbGw6IzY0NjQ2NDtmaWxsLW9wYWNpdHk6MSIgZD0iTTQgMkMyLjg5NDUzMSAyIDIgMi44OTQ1MzEgMiA0VjE3QzIgMTcuNTUwNzgxIDIuNDQ5MjE5IDE4IDMgMThTNCAxNy41NTA3ODEgNCAxN1Y0SDE3QzE3LjU1MDc4MSA0IDE4IDMuNTUwNzgxIDE4IDNTMTcuNTUwNzgxIDIgMTcgMnpNOCA2QzYuODk0NTMxIDYgNiA2Ljg5NDUzMSA2IDhWMjBDNiAyMS4xMDU0NjkgNi44OTQ1MzEgMjIgOCAyMkgyMEMyMS4xMDU0NjkgMjIgMjIgMjEuMTA1NDY5IDIyIDIwVjhDMjIgNi44OTQ1MzEgMjEuMTA1NDY5IDYgMjAgNnpNOCA4SDIwVjIwSDh6TTggOCIvPjwvc3ZnPg=="); background-position: 50% center; background-repeat: no-repeat; background-size: 16px 16px; border-radius: 2px; box-sizing: inherit; cursor: pointer; height: 1.45rem; margin-bottom: 1px; margin-left: -0.2rem; opacity: 0; position: absolute; right: 4px; top: 5px; transition: all 0.2s ease 0s; vertical-align: middle; width: 27px; z-index: 11;" title="Copy to clipboard"></span></div></td><td class="lntd" style="border-collapse: collapse; border: 0px; box-sizing: inherit; margin: 0px; padding: 0px; vertical-align: top; width: 832.094px;"><pre class="chroma" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 0.34rem; box-sizing: inherit; color: #344952; direction: ltr; font-family: Consolas, Monaco, Menlo, "dejavu sans mono", "bitstream vera sans mono", "courier new", "lucida console", "lucida sans typewriter", "liberation mono", "nimbus mono l", Monaco, Courier, monospace; font-size: 13.8px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 34px 4px 6px;"><code class="language-bash" data-lang="bash" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: Consolas, Monaco, Menlo, "dejavu sans mono", "bitstream vera sans mono", "courier new", "lucida console", "lucida sans typewriter", "liberation mono", "nimbus mono l", Monaco, Courier, monospace; font-size: 13.8px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; overflow: auto; padding: 0px;">touch <span class="s2" style="box-sizing: inherit; color: #728fcb;">"</span><span class="nv" style="box-sizing: inherit; color: #896724;">$HOME</span><span class="s2" style="box-sizing: inherit; color: #728fcb;">/.cache/zshhistory"</span>
<span class="c1" style="box-sizing: inherit; color: #b6ad9a; font-style: italic;">#-- Setup Alias in $HOME/zsh/aliasrc</span>
git clone --depth<span class="o" style="box-sizing: inherit; color: #728fcb; font-weight: 700;">=</span><span class="m" style="box-sizing: inherit; color: #009999; grid-area: 1 / 2 / 2 / 3;">1</span> https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
<span class="nb" style="box-sizing: inherit; color: #0086b3;">echo</span> <span class="s1" style="box-sizing: inherit; color: #728fcb;">'source ~/powerlevel10k/powerlevel10k.zsh-theme'</span> >> ~/.zshrc
</code></pre><span class="copy-to-clipboard" style="background-image: url("data:image/svg+xml;utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjRwdCIgaGVpZ2h0PSIyNHB0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPlxhPHBhdGggc3R5bGU9InN0cm9rZTpub25lO2ZpbGwtcnVsZTpub256ZXJvO2ZpbGw6IzY0NjQ2NDtmaWxsLW9wYWNpdHk6MSIgZD0iTTQgMkMyLjg5NDUzMSAyIDIgMi44OTQ1MzEgMiA0VjE3QzIgMTcuNTUwNzgxIDIuNDQ5MjE5IDE4IDMgMThTNCAxNy41NTA3ODEgNCAxN1Y0SDE3QzE3LjU1MDc4MSA0IDE4IDMuNTUwNzgxIDE4IDNTMTcuNTUwNzgxIDIgMTcgMnpNOCA2QzYuODk0NTMxIDYgNiA2Ljg5NDUzMSA2IDhWMjBDNiAyMS4xMDU0NjkgNi44OTQ1MzEgMjIgOCAyMkgyMEMyMS4xMDU0NjkgMjIgMjIgMjEuMTA1NDY5IDIyIDIwVjhDMjIgNi44OTQ1MzEgMjEuMTA1NDY5IDYgMjAgNnpNOCA4SDIwVjIwSDh6TTggOCIvPjwvc3ZnPg=="); background-position: 50% center; background-repeat: no-repeat; background-size: 16px 16px; border-radius: 2px; box-sizing: inherit; cursor: pointer; height: 1.45rem; margin-bottom: 1px; margin-left: -0.2rem; opacity: 0; position: absolute; right: 4px; top: 5px; transition: all 0.2s ease 0s; vertical-align: middle; width: 27px; z-index: 11;" title="Copy to clipboard"></span></td></tr></tbody></table></div></div><h2 id="complete-switch-from-bash-to-zsh" style="background-color: #fafafa; box-sizing: inherit; color: #607d8b; font-family: montserrat, sans-serif; font-size: 2.2rem; line-height: 1.25; margin: 3.2rem 0px 1.5rem; padding: 0px; position: relative; text-rendering: optimizelegibility;">Complete Switch from BASH to ZSH</h2><div class="highlight" style="background-color: #fafafa; box-sizing: inherit; color: #424242; font-family: muli, sans-serif, muli, avenir, "helvetica neue", helvetica, ubuntu, roboto, noto, "segoe ui", arial, sans-serif; font-size: 16px; position: relative;"><div class="chroma" style="background: rgb(236, 239, 241); border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.125) 1px 1px 2px; box-sizing: inherit; color: #344952; direction: ltr; margin: 1em 0px; overflow-x: auto; position: relative; z-index: 7;"><table class="lntable" style="border-collapse: collapse; border-spacing: 0px; border: 0px; box-sizing: inherit; display: block; margin: 0px; overflow: auto; padding: 0px; width: auto;"><tbody style="box-sizing: inherit;"><tr style="border-collapse: collapse; box-sizing: inherit; margin: 0px; padding: 0px; width: 859.422px;"><td class="lntd" style="border-collapse: collapse; border: 0px; box-sizing: inherit; margin: 0px; padding: 0px; user-select: none; vertical-align: top; width: 10px;"><div class="language-code" data-lang="Code" style="box-sizing: inherit;"><pre class="chroma" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 0.34rem; box-sizing: inherit; color: #344952; direction: ltr; font-family: Consolas, Monaco, Menlo, "dejavu sans mono", "bitstream vera sans mono", "courier new", "lucida console", "lucida sans typewriter", "liberation mono", "nimbus mono l", Monaco, Courier, monospace; font-size: 13.8px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 34px 4px 6px;"><code style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 4px; box-sizing: inherit; color: #26a69a; font-family: Consolas, Monaco, Menlo, "dejavu sans mono", "bitstream vera sans mono", "courier new", "lucida console", "lucida sans typewriter", "liberation mono", "nimbus mono l", Monaco, Courier, monospace; font-size: 13.8px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; overflow: auto; padding: 0px;"><span class="lnt" style="box-sizing: inherit; color: #aaaaaa; padding: 0px 0.4em;">1
</span></code></pre><span class="copy-to-clipboard" style="background-image: url("data:image/svg+xml;utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjRwdCIgaGVpZ2h0PSIyNHB0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPlxhPHBhdGggc3R5bGU9InN0cm9rZTpub25lO2ZpbGwtcnVsZTpub256ZXJvO2ZpbGw6IzY0NjQ2NDtmaWxsLW9wYWNpdHk6MSIgZD0iTTQgMkMyLjg5NDUzMSAyIDIgMi44OTQ1MzEgMiA0VjE3QzIgMTcuNTUwNzgxIDIuNDQ5MjE5IDE4IDMgMThTNCAxNy41NTA3ODEgNCAxN1Y0SDE3QzE3LjU1MDc4MSA0IDE4IDMuNTUwNzgxIDE4IDNTMTcuNTUwNzgxIDIgMTcgMnpNOCA2QzYuODk0NTMxIDYgNiA2Ljg5NDUzMSA2IDhWMjBDNiAyMS4xMDU0NjkgNi44OTQ1MzEgMjIgOCAyMkgyMEMyMS4xMDU0NjkgMjIgMjIgMjEuMTA1NDY5IDIyIDIwVjhDMjIgNi44OTQ1MzEgMjEuMTA1NDY5IDYgMjAgNnpNOCA4SDIwVjIwSDh6TTggOCIvPjwvc3ZnPg=="); background-position: 50% center; background-repeat: no-repeat; background-size: 16px 16px; border-radius: 2px; box-sizing: inherit; cursor: pointer; height: 1.45rem; margin-bottom: 1px; margin-left: -0.2rem; opacity: 0; position: absolute; right: 4px; top: 5px; transition: all 0.2s ease 0s; vertical-align: middle; width: 27px; z-index: 11;" title="Copy to clipboard"></span></div></td><td class="lntd" style="border-collapse: collapse; border: 0px; box-sizing: inherit; margin: 0px; padding: 0px; vertical-align: top; width: 832.094px;"><pre class="chroma" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 0.34rem; box-sizing: inherit; color: #344952; direction: ltr; font-family: Consolas, Monaco, Menlo, "dejavu sans mono", "bitstream vera sans mono", "courier new", "lucida console", "lucida sans typewriter", "liberation mono", "nimbus mono l", Monaco, Courier, monospace; font-size: 13.8px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; hyphens: none; line-height: 1.5; margin-bottom: 0px; margin-top: 0px; overflow: auto; padding: 34px 4px 6px;"><code class="language-bash" data-lang="bash" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: inherit; font-family: Consolas, Monaco, Menlo, "dejavu sans mono", "bitstream vera sans mono", "courier new", "lucida console", "lucida sans typewriter", "liberation mono", "nimbus mono l", Monaco, Courier, monospace; font-size: 13.8px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; overflow: auto; padding: 0px;">chsh <span class="nv" style="box-sizing: inherit; color: #896724;">$USER</span>
</code></pre></td></tr></tbody></table></div></div><p style="background-color: #fafafa; box-sizing: inherit; color: #424242; font-family: muli, sans-serif, muli, avenir, "helvetica neue", helvetica, ubuntu, roboto, noto, "segoe ui", arial, sans-serif; font-size: 16px; margin: 0px 0px 1.75rem; padding: 0px;"><em style="box-sizing: inherit;">Then type <code style="background: rgb(236, 239, 241); border-radius: 4px; box-sizing: inherit; color: #26a69a; font-family: Consolas, Monaco, Menlo, "dejavu sans mono", "bitstream vera sans mono", "courier new", "lucida console", "lucida sans typewriter", "liberation mono", "nimbus mono l", Monaco, Courier, monospace; font-size: 13.8px; font-stretch: normal; font-style: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; overflow: auto; padding: 3px 7px;">/bin/zsh</code></em></p><p style="background-color: #fafafa; box-sizing: inherit; color: #424242; font-family: muli, sans-serif, muli, avenir, "helvetica neue", helvetica, ubuntu, roboto, noto, "segoe ui", arial, sans-serif; font-size: 16px; margin: 0px 0px 1.75rem; padding: 0px;"><em style="box-sizing: inherit;">OR</em> Edit <code style="background: rgb(236, 239, 241); border-radius: 4px; box-sizing: inherit; color: #26a69a; font-family: Consolas, Monaco, Menlo, "dejavu sans mono", "bitstream vera sans mono", "courier new", "lucida console", "lucida sans typewriter", "liberation mono", "nimbus mono l", Monaco, Courier, monospace; font-size: 13.8px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: 1.5; overflow: auto; padding: 3px 7px;">/etc/passwd</code> and change /bin/bash to /bin/zsh</p><p style="background-color: #fafafa; box-sizing: inherit; color: #424242; font-family: muli, sans-serif, muli, avenir, "helvetica neue", helvetica, ubuntu, roboto, noto, "segoe ui", arial, sans-serif; font-size: 16px; margin: 0px 0px 1.75rem; padding: 0px;"><img alt="ZSH Switch" src="https://d33wubrfki0l68.cloudfront.net/fb8f06783b6f544c2fcea72fa15787756609be53/e8bc5/images/2020/zsh-passwd.png" style="border-radius: 0.25rem; box-sizing: inherit; cursor: pointer; display: block; height: auto; margin: 0px auto; max-width: 100%; object-fit: inherit;" /></p><div><br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7376522.post-51222180519056208042021-05-31T09:59:00.001-03:002021-05-31T09:59:10.158-03:00Reading Data From A Digital Uni-T Multimeter Using A Raspberry Pi<p> <a href="https://core.ac.uk/download/pdf/38099841.pdf">https://core.ac.uk/download/pdf/38099841.pdf</a></p><p><a href="https://pypi.org/project/ut61e/">https://pypi.org/project/ut61e/</a><br /></p><p><br /></p><p><span style="background-color: #fdfdfd; color: #464646; font-family: "Source Sans Pro", Helvetica, Arial, sans-serif; font-size: 16px;">This is a Python package helping you to capture and interpret data from the digital multimeter Uni-T UT61E. You can easily install it via </span><tt style="background-color: #f9f9f9; border: 1px solid rgb(211, 211, 211); box-sizing: inherit; color: #6c6c6c; font-family: "Source Code Pro", monospace; font-size: 0.85rem; padding: 0px 2px 1px;">pip</tt><span style="background-color: #fdfdfd; color: #464646; font-family: "Source Sans Pro", Helvetica, Arial, sans-serif; font-size: 16px;">.</span></p><p><span style="background-color: #fdfdfd; color: #464646; font-family: "Source Sans Pro", Helvetica, Arial, sans-serif; font-size: 16px;"><br /></span></p><p><span style="background-color: #fdfdfd; color: #464646; font-family: "Source Sans Pro", Helvetica, Arial, sans-serif; font-size: 16px;"><br /></span></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7376522.post-12091799363471315442021-03-31T07:37:00.001-03:002021-03-31T07:37:14.046-03:00Very cool wallpaper for KDE Plasma Plasma Wallpaper Plugins<p> It changes pictures and captures photos from external urls</p><p><span style="background-color: white; color: #2673b0; font-family: "Open Sans", sans-serif; font-size: 25px; font-weight: 700;">Vallpaper</span></p><p><span style="background-color: white; color: #2673b0; font-family: "Open Sans", sans-serif; font-size: 25px; font-weight: 700;"></span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWAEkcr5ahFYLJzH9Adj7ZNZdMCFBnHhDQtiq-WknpjXoKbs53FEqod8YpKs5q_h1sdlfYOPLNCnmfqDY6A8Hd6yjtE1iWJV04bEUsfz0zSF_JNh81ETX3zp8FSACLI-_YSVXt/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1024" data-original-width="1280" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWAEkcr5ahFYLJzH9Adj7ZNZdMCFBnHhDQtiq-WknpjXoKbs53FEqod8YpKs5q_h1sdlfYOPLNCnmfqDY6A8Hd6yjtE1iWJV04bEUsfz0zSF_JNh81ETX3zp8FSACLI-_YSVXt/" width="300" /></a></div><br /><br /><p></p><p><a href="https://store.kde.org/p/1197828">https://store.kde.org/p/1197828</a><br /></p><p><br /></p><p><br /></p><p>Some url's that can be used:</p><p><span style="background-color: white; color: #4e4e4e; font-family: "Open Sans", sans-serif;">https://source.unsplash.com/random</span><br style="background-color: white; box-sizing: border-box; color: #4e4e4e; font-family: "Open Sans", sans-serif;" /><span style="background-color: white; color: #4e4e4e; font-family: "Open Sans", sans-serif;">https://source.unsplash.com/collection/190727</span><br style="background-color: white; box-sizing: border-box; color: #4e4e4e; font-family: "Open Sans", sans-serif;" /><span style="background-color: white; color: #4e4e4e; font-family: "Open Sans", sans-serif;">https://source.unsplash.com/random/?nature,water</span><br style="background-color: white; box-sizing: border-box; color: #4e4e4e; font-family: "Open Sans", sans-serif;" /><span style="background-color: white; color: #4e4e4e; font-family: "Open Sans", sans-serif;">http://thecatapi.com/api/images/get</span></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7376522.post-44744770078120585212021-03-24T15:49:00.002-03:002021-03-24T15:49:19.632-03:00Official Evernote Application For Linux Available For Download (Beta)<p> https://aur.archlinux.org/packages/evernote-beta-bin/</p><p><br /></p><p>https://cdn1.evernote.com/boron/linux/builds/Evernote-10.7.6-linux-ddl-ga-2321.deb</p><p><br /></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7376522.post-26206024892559976772021-01-05T17:38:00.002-03:002021-01-06T09:18:37.046-03:00Android backup restore new app Migrate - custom ROM migration tool - backup - restore<p><span style="background-color: white;"><a href="https://forum.xda-developers.com/t/app-root-5-0-1st-nov-2020-migrate-custom-rom-migration-tool.3862763/">https://forum.xda-developers.com/t/app-root-5-0-1st-nov-2020-migrate-custom-rom-migration-tool.3862763/</a> </span></p><p><span style="background-color: white;"><span face="roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif" style="font-size: 18px;">Jumping from one custom ROM to another can be a challenging task. So I decided to make an app to simplify the process.</span></span></p><span style="background-color: white;"><br style="box-sizing: border-box; font-family: roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif; font-size: 13px;" /><span face="roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif" style="box-sizing: border-box; font-size: 18px;"><span style="box-sizing: border-box; font-weight: 700;">Introducing</span></span><br style="box-sizing: border-box; font-family: roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif; font-size: 13px;" /><span style="box-sizing: border-box; font-family: "Arial Black"; font-size: 13px;"><span style="box-sizing: border-box; font-size: 26px;"><span style="box-sizing: border-box;">Migrate!</span></span></span><br style="box-sizing: border-box; font-family: roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif; font-size: 13px;" /><br style="box-sizing: border-box; font-family: roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif; font-size: 13px;" /><span face="roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif" style="box-sizing: border-box; font-size: 13px;"><span style="box-sizing: border-box; font-weight: 700;"><span style="box-sizing: border-box; font-size: 18px;">Migrate-GPE (v4.0) is on Google Play</span></span></span><br style="box-sizing: border-box; font-family: roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif; font-size: 13px;" /><span face="roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif" style="font-size: 13px;">It was temporarily suspended. Read more here: </span><a class="link link--internal" href="https://forum.xda-developers.com/showpost.php?p=82230451&postcount=1273" style="box-sizing: border-box; font-family: roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif; font-size: 13px; text-decoration-line: none;">https://forum.xda-developers.com/showpost.php?p=82230451&postcount=1273</a><br style="box-sizing: border-box; font-family: roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif; font-size: 13px;" /><br style="box-sizing: border-box; font-family: roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif; font-size: 13px;" /><a class="link link--external" href="https://play.google.com/store/apps/details?id=balti.migrate" rel="ugc nofollow noopener" style="box-sizing: border-box; font-family: roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif; font-size: 13px; text-decoration-line: none;" target="_blank"><span style="box-sizing: border-box; font-size: 18px;"><span style="box-sizing: border-box;">Download from Google Play Store</span></span></a><br style="box-sizing: border-box; font-family: roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif; font-size: 13px;" /><a class="link link--external" href="https://www.androidfilehost.com/?w=files&flid=285270" rel="ugc nofollow noopener" style="box-sizing: border-box; font-family: roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif; font-size: 13px; text-decoration-line: none;" target="_blank"><span style="box-sizing: border-box; font-size: 18px;"><span style="box-sizing: border-box;">Download from AndroidFileHost</span></span></a><br style="box-sizing: border-box; font-family: roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif; font-size: 13px;" /><span face="roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif" style="box-sizing: border-box; font-size: 18px; text-decoration-line: none;"><span style="box-sizing: border-box;"><a class="link link--external" href="https://labs.xda-developers.com/store/app/balti.migrate.ng" rel="ugc nofollow noopener" style="box-sizing: border-box; font-family: roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif; font-size: 13px; text-decoration-line: none;" target="_blank">Download from XDA labs</a></span></span></span><div><span style="background-color: white;"><span face="roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif" style="box-sizing: border-box; font-size: 18px; text-decoration-line: none;"><br /></span></span></div><div><span style="background-color: white;"><span face="roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif" style="box-sizing: border-box; font-size: 18px; text-decoration-line: none;"><br /></span></span></div><div><span style="background-color: white;"><span face="roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif" style="box-sizing: border-box; font-size: 18px; text-decoration-line: none;"><br /></span></span></div><div><span style="background-color: white;"><span face="roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif" style="font-size: 13px;">With </span><span face="roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif" style="box-sizing: border-box; font-size: 13px; font-weight: 700;">Migrate</span><span face="roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif" style="font-size: 13px;">, you can back up:</span><br style="box-sizing: border-box; font-family: roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif; font-size: 13px;" /></span><ol style="box-sizing: border-box; font-family: roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif; font-size: 13px; margin-bottom: 1em; margin-top: 1em; overflow: hidden;"><li data-xf-list-type="ol" style="box-sizing: border-box;"><span style="background-color: white;">App apk</span></li><li data-xf-list-type="ol" style="box-sizing: border-box;"><span style="background-color: white;">App data</span></li><li data-xf-list-type="ol" style="box-sizing: border-box;"><span style="background-color: white;">App runtime permissions</span></li><li data-xf-list-type="ol" style="box-sizing: border-box;"><span style="background-color: white;">Contacts (as vcf file)</span></li><li data-xf-list-type="ol" style="box-sizing: border-box;"><span style="background-color: white;">SMS messages</span></li><li data-xf-list-type="ol" style="box-sizing: border-box;"><span style="background-color: white;">Call logs</span></li><li data-xf-list-type="ol" style="box-sizing: border-box;"><span style="background-color: white;">Current ROM screen DPI</span></li><li data-xf-list-type="ol" style="box-sizing: border-box;"><span style="background-color: white;">Current default keyboard option</span></li><li data-xf-list-type="ol" style="box-sizing: border-box;"><span style="background-color: white;">App installer (Migrate 3.0)</span></li><li data-xf-list-type="ol" style="box-sizing: border-box;"><span style="background-color: white;">Adb state (Migrate 3.0)</span></li><li data-xf-list-type="ol" style="box-sizing: border-box;"><span style="background-color: white;">Font scale (Migrate 3.0)</span></li></ol><span style="background-color: white;"><br style="box-sizing: border-box; font-family: roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif; font-size: 13px;" /><span face="roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif" style="font-size: 13px;">... everything in one app.</span></span></div><div><span style="background-color: white;"><span face="roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif" style="font-size: 13px;"><br /></span></span></div><div><span style="background-color: white;"><span face="roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif" style="font-size: 13px;">-------------------</span></span></div><h2 style="text-align: left;"><span style="background-color: white;"><span face="roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif" style="font-size: 13px;">Edit - another cool script / app<br /><a href="https://forum.xda-developers.com/t/tools-zips-scripts-android-backup-and-restore-tools-multiple-devices-platforms.4016617/">https://forum.xda-developers.com/t/tools-zips-scripts-android-backup-and-restore-tools-multiple-devices-platforms.4016617/</a><br /></span></span></h2><div><span style="background-color: white;"><span face="roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif" style="font-size: 13px;"><br /></span></span></div><div><span style="background-color: white;"><span face="roboto, -apple-system, BlinkMacSystemFont, "segoe ui", oxygen, ubuntu, cantarell, "fira sans", "droid sans", "helvetica neue", sans-serif" style="font-size: 13px;"><br /></span></span></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7376522.post-20739513948845697642020-07-05T20:02:00.001-03:002020-07-06T07:26:45.394-03:00apcupsd no modelo BZ1500XLBI-BRidentifique seu APC através:<br />
$ ls -l /dev/usb/<br />
total 0<br />
crw------- 1 root root 180, 96 Jul 5 20:00 hiddev0<br />
<br />
depois execute<br />
$ udevadm info --attribute-walk --name=/dev/usb/hiddev0 | egrep 'manufacturer|product|serial'<br />
<br />
ATTRS{manufacturer}=="APC by Schneider"<br />
ATTRS{serial}=="VIDE ETIQUETA"<br />
ATTRS{product}=="BZ1500XLBI-BR"<br />
ATTRS{product}=="USB2.0 Hub"<br />
ATTRS{serial}=="0000:01:00.0"<br />
ATTRS{manufacturer}=="Linux 4.19.118-v7l+ xhci-hcd"<br />
ATTRS{product}=="xHCI Host Controller" <br />
<br />
<br />
no /etc/apcupsd/apcupsd.conf<br />
<br />
UPSTYPE usb<br />
DEVICE /dev/usb/hiddev0 (verifique se está em hiddev0, conforme o comando acima)<br />
<br />
$ systemctl stop apcupsd.service<br />
$ apctest (deve funcionar e ser possível verificar o UPS)<br />
$ systemctl start apcupsd.service<br />
<br />
<br />
Referencias:<br />
<br />
<a href="https://wiki.debian.org/apcupsd#Configuring_.28Single_UPS_Device.29">https://wiki.debian.org/apcupsd#Configuring_.28Single_UPS_Device.29</a><br />
<a href="http://www.apcupsd.org/manual/manual.html#usb-configuration">http://www.apcupsd.org/manual/manual.html#usb-configuration</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7376522.post-89229710192635410092020-06-29T12:17:00.000-03:002020-06-29T13:19:02.176-03:00Instalar Smart TV IPTv app na Samsung manual via Develop<a href="https://siptv.eu/howto/sammy/">https://siptv.eu/howto/sammy/</a><br />
<br />
<span style="background-color: white; font-size: 17px;">You can also use Sync server IP address 116.202.226.250</span><span style="background-color: white; font-size: 17px;"> to use in </span><strong style="background-color: white; font-size: 17px;"><a href="https://developer.samsung.com/smarttv/develop/legacy-platform-library/art00121/index.html#login-to-user-app-and-install-an-application" style="color: #372b9c; text-decoration-line: none;" target="_blank">developer mode</a></strong><span style="background-color: white; font-size: 17px;">.</span><br />
<span style="background-color: white; font-size: 17px;"><br /></span>
<span style="background-color: white; font-size: 17px;"><br /></span>
<span style="background-color: white; font-size: 17px;">Ir no menu e conectar na conta como "develop".</span><br />
<span style="background-color: white; font-size: 17px;"><br /></span>
<span style="background-color: white; font-size: 17px;">Após isso pressionar um aplicativo na lista até aparecer o menu lateral, conforme imagem...</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTR4wJ5arfmMUI2O2IPsKDCTsECiX-DvrSSBdGjP7ywdbeKecEPxm1xTfKqBvcXRZa2DCgvh06cChPoIZaZBrEUrvDV7LuAnpe9fyb1KgGYHhLSuFcApi9dtaYcYkDEeEQnMQF/s1600/menu_samsung.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="336" data-original-width="330" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTR4wJ5arfmMUI2O2IPsKDCTsECiX-DvrSSBdGjP7ywdbeKecEPxm1xTfKqBvcXRZa2DCgvh06cChPoIZaZBrEUrvDV7LuAnpe9fyb1KgGYHhLSuFcApi9dtaYcYkDEeEQnMQF/s320/menu_samsung.png" width="314" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Adicionar o IP e repetir o menu Atualizar Apps</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
O Smart IPTV deve aparecer...</div>
<span style="background-color: white; font-size: 17px;"><br /></span>
<span style="background-color: white; font-size: 17px;">Developer IP para SSIPTV 91.122.100.196</span><br />
<span style="background-color: white; font-size: 17px;"><br /></span><span style="font-size: 17px;"><span style="background-color: white;">116.202.226.250</span> (Smart IPTV)</span><br />
<span style="font-size: 17px;">91 122 100 196 (SSIPTV)</span><br />
<span style="font-size: 17px;"><span style="background-color: white;"></span></span><br />
<span style="font-size: 17px;">94 23 97 11 (Set Iptv)</span><br />
<span style="font-size: 17px;"><br /></span>
<span style="background-color: white; font-size: 17px;"><br /></span>
<span style="background-color: white; font-size: 17px;"><br /></span>
<span style="background-color: white; font-size: 17px;"><br /></span>
<span style="background-color: white; font-size: 17px;"><br /></span>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-7376522.post-79870165768067260232020-06-01T11:50:00.001-03:002020-06-01T11:50:29.234-03:00Install Firebird 1.5 on Debian stretch 9.8 architecture amd64The most tricky paristo make your amd64 system install i386 packages in order to have Firebird running.<br />
<br />
<br />
Let's start by running dpkg and add i386 as new architecture. <a href="https://wiki.debian.org/Multiarch/HOWTO#Configuring_architectures">Reference here</a><br />
<br />
<b>dpkg --add-architecture i386</b><br />
<br />
change /etc/apt/sources.list<br />
(exemple bellow)<br />
deb [arch=amd64,i386] http://ftp.br.debian.org/debian/ stretch main<br />
deb-src [arch=amd64,i386] http://ftp.br.debian.org/debian/ stretch main<br />
<br />
deb [arch=amd64,i386] http://security.debian.org/debian-security stretch/updates main<br />
deb-src [arch=amd64,i386] http://security.debian.org/debian-security stretch/updates main<br />
<br />
# stretch-updates, previously known as 'volatile'<br />
deb [arch=amd64,i386] http://ftp.br.debian.org/debian/ stretch-updates main<br />
deb-src [arch=amd64,i386] http://ftp.br.debian.org/debian/ stretch-updates main<br />
<div>
<br /></div>
<div>
<br /></div>
<div>
---</div>
<div>
Install the required packages</div>
<div>
<br /></div>
<div>
<b>apt install lib32ncurses5</b></div>
<div>
<b>apt install libstdc++5:i386</b></div>
<div>
<br /></div>
<div>
--</div>
<div>
<br /></div>
<div>
Check with ldd if the library are working fine...</div>
<div>
<div>
<b>ldd /opt/firebird/lib/libfbclient.so</b></div>
<div>
linux-gate.so.1 (0xf7746000)</div>
<div>
libstdc++.so.5 => /usr/lib/i386-linux-gnu/libstdc++.so.5 (0xf7606000)</div>
<div>
libncurses.so.5 => /lib32/libncurses.so.5 (0xf75e1000)</div>
<div>
libcrypt.so.1 => /lib/i386-linux-gnu/libcrypt.so.1 (0xf75af000)</div>
<div>
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf755a000)</div>
<div>
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf73a2000)</div>
<div>
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf739d000)</div>
<div>
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf7380000)</div>
<div>
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf7362000)</div>
<div>
libtinfo.so.5 => /lib32/libtinfo.so.5 (0xf733f000)</div>
<div>
/lib/ld-linux.so.2 (0xf7748000)</div>
</div>
<div>
<br /></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7376522.post-4151657501133337792020-03-20T14:10:00.001-03:002020-03-20T15:04:43.655-03:00Raspberry Oled Screen with DHT22 Temperature Sensor<br />
<br />
<br />
<br />
The code bellow needs improvements<br />
<br />
<br />
<br />
<br />
<br />
<div style="-webkit-text-stroke-width: 0px; color: black; font-family: "Times New Roman"; font-size: medium; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
</div>
<br />
<div style="orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; widows: 2;">
<div style="background-color: white; box-sizing: border-box; margin-bottom: 10px;">
<div style="-webkit-text-stroke-width: 0px; color: #333333; font-family: "helvetica neue", helvetica, arial, sans-serif; font-size: 14px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">
Need enable i2c and install some libraries... (Python 3.x)</div>
<div style="-webkit-text-stroke-width: 0px; color: #333333; font-family: "helvetica neue", helvetica, arial, sans-serif; font-size: 14px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">
<br /></div>
<div style="margin: 0px;">
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 14px;">pip3 install --upgrade luma.oled</span></span></div>
<div style="margin: 0px;">
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 14px;">pip3 install Adafruit_DHT</span></span></div>
<div style="-webkit-text-stroke-width: 0px; color: #333333; font-family: "helvetica neue", helvetica, arial, sans-serif; font-size: 14px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">
<br /></div>
<div style="-webkit-text-stroke-width: 0px; color: #333333; font-family: "helvetica neue", helvetica, arial, sans-serif; font-size: 14px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">
Optional luma.examples</div>
<div style="-webkit-text-stroke-width: 0px; color: #333333; font-family: "helvetica neue", helvetica, arial, sans-serif; font-size: 14px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">
<a href="https://github.com/rm-hull/luma.examples">https://github.com/rm-hull/luma.examples</a></div>
<div style="-webkit-text-stroke-width: 0px; color: #333333; font-family: "helvetica neue", helvetica, arial, sans-serif; font-size: 14px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">
<br /></div>
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 14px;">aptitude install python-dev python-pip libfreetype6-dev libjpeg-dev build-essential</span></span><br />
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 14px;">aptitude install i2c-tools libopenjp2-7 libtiff5 python3-dev git</span></span></div>
<pre data-language="language:bash
,bash
" style="background: rgb(248, 248, 248); border-radius: 3px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; line-height: 19px; margin: 0px 0px 20px; max-height: 350px; overflow-wrap: break-word; overflow: auto; padding: 6px 10px; word-break: break-all;"><button class="btn btn-default btn-sm copy-code" data-clipboard-text=">ls /dev/*spi*
" style="-webkit-text-stroke-width: 0px; background-color: white; background-image: none; border-color: rgb(204, 204, 204); border-radius: 3px; border-style: solid; border-width: 1px; color: #e0311d; cursor: pointer; float: right; font-family: sparkgauge, "arial narrow", "helvetica neue", helvetica, arial, sans-serif; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: 700; letter-spacing: 0.1em; line-height: 1.5; margin: 0px; overflow: visible; padding: 5px 10px; text-transform: uppercase; vertical-align: middle; white-space: normal; word-spacing: 0px;">COPY CODE</button><code class="rainbow" style="background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; margin: 0px; padding: 0px;"><span style="color: #333333; font-family: "consolas" , "liberation mono" , "courier" , monospace;"><span style="white-space: pre-wrap;">#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014-18 Richard Hull and contributors
# See LICENSE.rst for details.
# PYTHON_ARGCOMPLETE_OK
"""
Showcase viewport and hotspot functionality.
"""
import datetime
import os
import time
from demo_opts import get_device
from luma.core.virtual import viewport, snapshot
from PIL import ImageFont
import RPi.GPIO as GPIO
import board
from datetime import date
from datetime import datetime
import Adafruit_DHT
tiny_font = ImageFont.truetype(os.path.abspath(os.path.join(
os.path.dirname(__file__), "fonts", "FreePixel.ttf")), 10)
def right_text(draw, y, width, margin, text):
x = width - margin - draw.textsize(text, font=tiny_font)[0]
draw.text((x, y), text=text, font=tiny_font, fill="white")
def title_text(draw, y, width, text):
x = (width - draw.textsize(text)[0]) / 2
draw.text((x, y), text=text, fill="yellow")
def position(max):
forwards = range(0, max)
backwards = range(max, 0, -1)
while True:
for x in forwards:
yield x
for x in backwards:
yield x
def pause_every(interval, generator):
try:
while True:
x = next(generator)
if x % interval == 0:
for _ in range(20):
yield x
else:
yield x
except StopIteration:
pass
def render_clock(draw, width, height):
margin = 3
now = datetime.now()
today_date = now.strftime("%d %b %y")
current_time = now.strftime("%H:%m:%S")
title_text(draw, margin, width, today_date)
draw.text((margin + 10, 20), text=current_time, fill="white", font=tiny_font)
def render_temp(draw, width, height):
humidity, temperature_c = Adafruit_DHT.read_retry(22, 4)
margin = 3
now = datetime.now()
today_date = now.strftime("%d %b %y")
current_time = now.strftime("%H:%m:%S")
title_text(draw, margin, width, text="Temp DHT22")
draw.text((margin, 20), text="temperature:", font=tiny_font, fill="white")
draw.text((margin, 35), text="humidity:", font=tiny_font, fill="white")
draw.text((margin, 45), text=today_date, font=tiny_font, fill="white")
right_text(draw, 20, width, margin, text="{0:0.1f}%".format(temperature_c))
right_text(draw, 35, width, margin, text="{0:0.1f}%".format(humidity))
right_text(draw, 45, width, margin, text=current_time)
def render_temp2(draw, width, height):
humidity, temperature_c = Adafruit_DHT.read_retry(11, 17)
margin = 3
now = datetime.now()
today_date = now.strftime("%d %b %y")
current_time = now.strftime("%H:%m:%S")
title_text(draw, margin, width, text="Temp DHT11")
draw.text((margin, 20), text="temperature:", font=tiny_font, fill="white")
draw.text((margin, 35), text="humidity:", font=tiny_font, fill="white")
draw.text((margin, 45), text=today_date, font=tiny_font, fill="white")
right_text(draw, 20, width, margin, text="{0:0.1f}%".format(temperature_c))
right_text(draw, 35, width, margin, text="{0:0.1f}%".format(humidity))
right_text(draw, 45, width, margin, text=current_time)
def main():
# widget_width = device.width // 2
widget_width = device.width
widget_height = device.height
temp = snapshot(widget_width, widget_height, render_temp, interval=1.1)
temp2 = snapshot(widget_width, widget_height, render_temp2, interval=1.0)
clk = snapshot(widget_width, widget_height, render_clock, interval=1.0)
clk2 = snapshot(widget_width, widget_height, render_clock, interval=1.0)
widgets = [temp, temp2, clk, temp2]
virtual = viewport(device, width=widget_width * len(widgets), height=widget_height)
for i, widget in enumerate(widgets):
virtual.add_hotspot(widget, (i * widget_width, 0))
# for x in pause_every(widget_width, position(widget_width * (len(widgets) - 1))):
# print("x=",x)
# virtual.set_position((x, 0))
x = 0
while True:
virtual.set_position((0, 0))
time.sleep(1)
#virtual.set_position((128, 0))
#time.sleep(2)
#virtual.set_position((256, 0))
#time.sleep(6)
if __name__ == "__main__":
try:
device = get_device()
main()
except KeyboardInterrupt:
pass
</span></span><span style="color: rgba(0 , 0 , 0 , 0); font-family: "consolas" , "liberation mono" , "courier" , monospace;"><span style="white-space: pre-wrap;">
</span></span></code></pre>
<div style="-webkit-text-stroke-width: 0px; background-color: white; box-sizing: border-box; color: #333333; font-family: "helvetica neue", helvetica, arial, sans-serif; font-size: 14px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 10px; text-transform: none; white-space: normal; word-spacing: 0px;">
<div style="margin: 0px;">
<br /></div>
</div>
</div>
<div style="orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; widows: 2;">
<div style="background-color: white; box-sizing: border-box; margin-bottom: 10px;">
<span style="color: #333333; font-family: "helvetica neue" , "helvetica" , "arial" , sans-serif;"><span style="font-size: 14px;">systetmd</span></span><br />
<span style="color: #333333; font-family: helvetica neue, helvetica, arial, sans-serif;"><span style="color: #333333; font-family: helvetica neue, helvetica, arial, sans-serif; font-size: 14px;">vi /etc/systemd/system/temperature-widget.service</span></span></div>
<pre data-language="language:bash
,bash
" style="background: rgb(248, 248, 248); border-radius: 3px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; line-height: 19px; margin-bottom: 20px; max-height: 350px; overflow-wrap: break-word; overflow: auto; padding: 6px 10px; word-break: break-all;"><button class="btn btn-default btn-sm copy-code" data-clipboard-text=">ls /dev/*spi*
" style="background-color: white; background-image: none; border-color: rgb(204, 204, 204); border-radius: 3px; border-style: solid; border-width: 1px; color: #e0311d; cursor: pointer; float: right; font-family: sparkgauge, "arial narrow", "helvetica neue", helvetica, arial, sans-serif; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: 700; letter-spacing: 0.1em; line-height: 1.5; margin: 0px; overflow: visible; padding: 5px 10px; text-transform: uppercase; vertical-align: middle; white-space: normal; word-spacing: 0px;">COPY CODE</button><code class="rainbow" style="background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; margin: 0px; padding: 0px;"><span style="color: #333333; font-family: "consolas" , "liberation mono" , "courier" , monospace;"><span style="white-space: pre-wrap;">[Unit]
Description=Temperature sensor to OLED
After=syslog.target
[Service]
Type=simple
WorkingDirectory=/etc/script.d/
RemainAfterExit=yes
ExecStart=/etc/script.d/widget_temp.py
StandardOutput=syslog
StandardError=syslog
[Install]
WantedBy=multi-user.target
</span></span></code></pre>
</div>
<br />
<br />
<br />
<br />
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7376522.post-17658045997965060802020-03-19T11:00:00.000-03:002020-03-19T11:00:52.782-03:00How to setup OLED display with Raspberry Pi<div class="separator" style="clear: both; text-align: center;">
Source of this post -> <a href="http://codelectron.com/setup-oled-display-raspberry-pi-python/">HERE</a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://codelectron.com/setup-oled-display-raspberry-pi-python/">http://codelectron.com/setup-oled-display-raspberry-pi-python/</a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://luma-oled.readthedocs.io/en/latest/install.html">https://luma-oled.readthedocs.io/en/latest/install.html</a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://github.com/rm-hull/luma.examples">https://github.com/rm-hull/luma.examples</a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDi6hkqDdD7R5gq2UPV1PSbBACx26LnKTRU4I_8bzc95wcZ0oCY4b-8vm6KNM6fE2rhWkRV0d3xUuAH58Wy2nr1QznVV2D7Q83SUMe-DZ9R3oj8GCtIEm3amGm4-AD69r4VEPA/s1600/Oled.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="445" data-original-width="800" height="356" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDi6hkqDdD7R5gq2UPV1PSbBACx26LnKTRU4I_8bzc95wcZ0oCY4b-8vm6KNM6fE2rhWkRV0d3xUuAH58Wy2nr1QznVV2D7Q83SUMe-DZ9R3oj8GCtIEm3amGm4-AD69r4VEPA/s640/Oled.jpg" width="640" /></a></div>
<br />
<br />
aptitude install libopenjp2-7<br />
aptitude install libtiff5<br />
<br />
<h2 style="background-color: white; border: 0px; color: #333333; font-family: "Open Sans", sans-serif; font-size: 38px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-weight: normal; line-height: 1.2; margin: 0px; outline: 0px; padding: 0px 0px 18px; vertical-align: baseline;">
OLED display with Raspberry PI</h2>
<h4 style="background-color: white; border: 0px; color: #333333; font-family: "Open Sans", sans-serif; font-size: 30px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-weight: normal; line-height: 1.2; margin: 0px; outline: 0px; padding: 0px 0px 18px; vertical-align: baseline;">
Schematics:</h4>
<div style="background-color: white; border: 0px; color: #444444; font-family: "Open Sans", serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 1.6; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;">
The OLED should be connected as shown the in the below picture.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-70EvOqWoUBSWl3o7LpNpmCJg3tAKQ66qScvZjspVhEXWRuOoaZKWcPLywjejS2aptswZ2IsJi0wv-JyNWq2U-B1CAjRg8BOYMgWakliCDbFNg8B1bUEeSzQVPBH9qow-rOz-/s1600/rpi_bb.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="867" data-original-width="1374" height="401" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-70EvOqWoUBSWl3o7LpNpmCJg3tAKQ66qScvZjspVhEXWRuOoaZKWcPLywjejS2aptswZ2IsJi0wv-JyNWq2U-B1CAjRg8BOYMgWakliCDbFNg8B1bUEeSzQVPBH9qow-rOz-/s640/rpi_bb.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h2 style="background-color: white; border: 0px; color: #333333; font-family: "Open Sans", sans-serif; font-size: 38px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-weight: normal; line-height: 1.2; margin: 0px; outline: 0px; padding: 0px 0px 18px; vertical-align: baseline;">
I2C Driver:</h2>
<div>
<br /></div>
<div>
<h4 style="background-color: white; box-sizing: border-box; color: #555555; font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 1.1; margin-bottom: 10px; margin-top: 10px;">
raspi-config Tool <small style="box-sizing: border-box; color: #999999; font-size: 12px; line-height: 1;">via Terminal</small></h4>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin-bottom: 10px;">
If you are using a terminal, you will need to:</div>
<ol style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin-bottom: 10px; margin-top: 0px;">
<li style="box-sizing: border-box;">Run <code style="background: rgb(248, 248, 248); border-radius: 3px; border: 1px solid rgb(234, 234, 234); box-sizing: border-box; font-family: Consolas, "Liberation Mono", Courier, monospace; font-size: 12px; margin: 0px 2px; padding: 0px 5px;">sudo raspi-config</code>.</li>
<li style="box-sizing: border-box;">Use the down arrow to select <code style="background: rgb(248, 248, 248); border-radius: 3px; border: 1px solid rgb(234, 234, 234); box-sizing: border-box; font-family: Consolas, "Liberation Mono", Courier, monospace; font-size: 12px; margin: 0px 2px; padding: 0px 5px;">5 Interfacing Options</code></li>
<li style="box-sizing: border-box;">Arrow down to <code style="background: rgb(248, 248, 248); border-radius: 3px; border: 1px solid rgb(234, 234, 234); box-sizing: border-box; font-family: Consolas, "Liberation Mono", Courier, monospace; font-size: 12px; margin: 0px 2px; padding: 0px 5px;">P4 SPI</code>.</li>
<li style="box-sizing: border-box;">Select <code style="background: rgb(248, 248, 248); border-radius: 3px; border: 1px solid rgb(234, 234, 234); box-sizing: border-box; font-family: Consolas, "Liberation Mono", Courier, monospace; font-size: 12px; margin: 0px 2px; padding: 0px 5px;">yes</code> when it asks you to enable SPI,</li>
<li style="box-sizing: border-box;">Also select <code style="background: rgb(248, 248, 248); border-radius: 3px; border: 1px solid rgb(234, 234, 234); box-sizing: border-box; font-family: Consolas, "Liberation Mono", Courier, monospace; font-size: 12px; margin: 0px 2px; padding: 0px 5px;">yes</code> if it asks about automatically loading the kernel module.</li>
<li style="box-sizing: border-box;">Use the right arrow to select the <code style="background: rgb(248, 248, 248); border-radius: 3px; border: 1px solid rgb(234, 234, 234); box-sizing: border-box; font-family: Consolas, "Liberation Mono", Courier, monospace; font-size: 12px; margin: 0px 2px; padding: 0px 5px;"><finish></finish></code> button.</li>
<li style="box-sizing: border-box;">Select <code style="background: rgb(248, 248, 248); border-radius: 3px; border: 1px solid rgb(234, 234, 234); box-sizing: border-box; font-family: Consolas, "Liberation Mono", Courier, monospace; font-size: 12px; margin: 0px 2px; padding: 0px 5px;">yes</code> when it asks to reboot.</li>
</ol>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgctY5k2spbZZTo7kOjADtkII7TKtB1t2Duj9uIHbhrn5S-kPQQx6Y96l3YeSsIZtLC5sDN_OlFtBPPud9KdzN5kGjr-S1EzKbQZcX5aGkcGxi51ePrcnIz2YIpqdgtvlNy6Jz/s1600/spi-menu2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="418" data-original-width="661" height="404" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgctY5k2spbZZTo7kOjADtkII7TKtB1t2Duj9uIHbhrn5S-kPQQx6Y96l3YeSsIZtLC5sDN_OlFtBPPud9KdzN5kGjr-S1EzKbQZcX5aGkcGxi51ePrcnIz2YIpqdgtvlNy6Jz/s640/spi-menu2.png" width="640" /></a></div>
<div>
<span style="color: #333333; font-family: Helvetica Neue, Helvetica, Arial, sans-serif;"><span style="font-size: 14px;"><br /></span></span></div>
</div>
<div>
<span style="color: #333333; font-family: Helvetica Neue, Helvetica, Arial, sans-serif;"><span style="font-size: 14px;"><br /></span></span></div>
<div>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin-bottom: 10px;">
The system will reboot. When it comes back up, log in and enter the following command</div>
<pre data-language="language:bash
,bash
" style="background: rgb(248, 248, 248); border-radius: 3px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; color: #333333; font-family: Consolas, "Liberation Mono", Courier, monospace; font-size: 13px; line-height: 19px; margin-bottom: 20px; max-height: 350px; overflow-wrap: break-word; overflow: auto; padding: 6px 10px; word-break: break-all;"><button class="btn btn-default btn-sm copy-code" data-clipboard-text=">ls /dev/*spi*
" style="background-color: white; background-image: none; border-color: rgb(204, 204, 204); border-radius: 3px; border-style: solid; border-width: 1px; color: #e0311d; cursor: pointer; float: right; font-family: SparkGauge, "Arial Narrow", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: 700; letter-spacing: 0.1em; line-height: 1.5; margin: 0px; overflow: visible; padding: 5px 10px; text-transform: uppercase; touch-action: manipulation; user-select: none; vertical-align: middle; white-space: normal;">COPY CODE</button><code class="rainbow" style="background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: Consolas, "Liberation Mono", Courier, monospace; margin: 0px; padding: 0px; white-space: pre-wrap;"><span class="keyword operator" style="box-sizing: border-box; font-weight: bold;">></span>ls /dev/<span class="keyword operator" style="box-sizing: border-box; font-weight: bold;">*</span>spi<span class="keyword operator" style="box-sizing: border-box; font-weight: bold;">*</span>
</code></pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin-bottom: 10px;">
The Pi should respond with</div>
<pre data-language="language:bash
,bash
" style="background: rgb(248, 248, 248); border-radius: 3px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; color: #333333; font-family: Consolas, "Liberation Mono", Courier, monospace; font-size: 13px; line-height: 19px; margin-bottom: 20px; max-height: 350px; overflow-wrap: break-word; overflow: auto; padding: 6px 10px; word-break: break-all;"><button class="btn btn-default btn-sm copy-code" data-clipboard-text="/dev/spidev0.0 /dev/spidev0.1
" style="background-color: white; background-image: none; border-color: rgb(204, 204, 204); border-radius: 3px; border-style: solid; border-width: 1px; color: #e0311d; cursor: pointer; float: right; font-family: SparkGauge, "Arial Narrow", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 12px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: 700; letter-spacing: 0.1em; line-height: 1.5; margin: 0px; overflow: visible; padding: 5px 10px; text-transform: uppercase; touch-action: manipulation; user-select: none; vertical-align: middle; white-space: normal;">COPY CODE</button><code class="rainbow" style="background: transparent; border-radius: 0px; border: 0px; box-sizing: border-box; color: inherit; font-family: Consolas, "Liberation Mono", Courier, monospace; margin: 0px; padding: 0px; white-space: pre-wrap;">/dev/spidev0.<span class="constant numeric" style="box-sizing: border-box; color: #009999;">0</span> /dev/spidev0.<span class="constant numeric" style="box-sizing: border-box; color: #009999;">1</span>
</code></pre>
<div style="background-color: white; box-sizing: border-box; color: #333333; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; margin-bottom: 10px;">
These represent SPI devices on chip enable pins 0 and 1, respectively. These pins are hardwired within the Pi. Ordinarily, this means the interface supports at most two peripherals, but there are cases where multiple devices can be daisy-chained, sharing a single chip enable signal.</div>
</div>
<div>
<span style="color: #333333; font-family: Helvetica Neue, Helvetica, Arial, sans-serif;"><span style="font-size: 14px;"><br /></span></span></div>
<div>
<span style="color: #333333; font-family: Helvetica Neue, Helvetica, Arial, sans-serif;"><span style="font-size: 14px;"><br /></span></span></div>
<div>
<span style="color: #333333; font-family: Helvetica Neue, Helvetica, Arial, sans-serif;"><span style="font-size: 14px;"><br /></span></span></div>
<div>
<h2 style="background-color: white; border: 0px; color: #333333; font-family: "Open Sans", sans-serif; font-size: 38px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-weight: normal; line-height: 1.2; margin: 0px; outline: 0px; padding: 0px 0px 18px; vertical-align: baseline;">
Install i2c tools</h2>
<pre style="background-color: white; border: 1px solid rgb(234, 234, 234); color: #444444; font-family: "Courier 10 Pitch", Courier, monospace; font-size: 14px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 1.4; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline; white-space: pre-wrap;">root@raspberrypi:~# apt-get install i2c-tools</pre>
<div lang="zxx" style="background-color: white; border: 0px; color: #444444; font-family: "Open Sans", serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 1.6; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;">
We have connected the OLED display to the /dev/i2c-1 of the Raspberry Pi.<br />In order to know what is the I2C Address of the device (Though I know it already, it might help some where). We need to scan the I2C bus and there is a command for that, its called i2cdetect. It can be used as follows.</div>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgntnwG7L2dBq72LDXYwQrFLh7sCkYrKN-pVDEav30tpgaKAAw5NO6jreJEy4SZe3bgIkS5oTue9sJvMiBSWRF7UYD72ihEnOxDG4bkL6Wc1dNtncSsOpbVR5uMmzfBloVDUBxS/s1600/oled1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="255" data-original-width="623" height="260" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgntnwG7L2dBq72LDXYwQrFLh7sCkYrKN-pVDEav30tpgaKAAw5NO6jreJEy4SZe3bgIkS5oTue9sJvMiBSWRF7UYD72ihEnOxDG4bkL6Wc1dNtncSsOpbVR5uMmzfBloVDUBxS/s640/oled1.png" width="640" /></a></div>
<div>
<br /></div>
<div>
<span style="background-color: white; color: #444444; font-family: "Open Sans", serif; font-size: 15px;">Now we know that the I2C address of the device is </span><strong style="background-color: white; border: 0px; color: #444444; font-family: "Open Sans", serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">0x3C</strong><span style="background-color: white; color: #444444; font-family: "Open Sans", serif; font-size: 15px;">. But wait, we found that Address printed in the display as 0x78 and here it shows 0x3C, how is that possible? The answer is that the actual address of the device is 0X3C and you use address 0x78 or 0x79, for write or read. As an additional information the I2C bus allows devices to be plugged and unplugged without rebooting Pi. It’ll mess up some accesses, but I2C will recover.</span></div>
<div>
<span style="background-color: white; color: #444444; font-family: "Open Sans", serif; font-size: 15px;"><br /></span></div>
<div>
<span style="background-color: white; color: #444444; font-family: "Open Sans", serif; font-size: 15px;"><br /></span></div>
<div>
<span style="background-color: white; color: #444444; font-family: "Open Sans", serif; font-size: 15px;"><br /></span></div>
<div>
<span style="background-color: white; color: #444444; font-family: "Open Sans", serif; font-size: 15px;"><br /></span></div>
<div>
<h2 lang="zxx" style="background-color: white; border: 0px; color: #333333; font-family: "Open Sans", sans-serif; font-size: 38px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-weight: normal; line-height: 1.2; margin: 0px; outline: 0px; padding: 0px 0px 18px; vertical-align: baseline;">
<strong style="border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">OLED python Library </strong></h2>
<div lang="zxx" style="background-color: white; border: 0px; color: #444444; font-family: "Open Sans", serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 1.6; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;">
With the emergence of Pi board and the Linux distros along with it there are always more than one library available for each interface. Likewise for OLED display there are many libraries and many variants of libraries . For the OLED with SSD1306 I choose this library <a href="https://github.com/rm-hull/luma.oled" style="border: 0px; color: #4dd0e1; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration-line: none; vertical-align: baseline;">https://github.com/rm-hull/luma.oled </a>.</div>
<div lang="zxx" style="background-color: white; border: 0px; color: #444444; font-family: "Open Sans", serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 1.6; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;">
This is library is already available as part of python repository or as they called cheese cake factory ;). Type the below command to install all the required dependencies for using the OLED display.</div>
<div lang="zxx" style="background-color: white; border: 0px; color: #444444; font-family: "Open Sans", serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 1.6; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;">
<br /></div>
<div lang="zxx" style="border: 0px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 1.6; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;">
</div>
aptitude install libopenjp2-7<br />aptitude install libtiff5<br />aptitude install -y python-dev python-pip libfreetype6-dev libjpeg-dev build-essential<br />aptitude install python-dev python-pip libfreetype6-dev libjpeg-dev build-essential libopenjp2-7 libtiff5<br />
<span style="background-color: white; color: #444444; font-family: Open Sans, serif;"><br /><br /><span style="font-size: 15px;">pip install --upgrade luma.oled</span><br /><span style="font-size: 15px;">pip3 install --upgrade luma.oled</span></span><br />
<div lang="zxx" style="background-color: white; border: 0px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 1.6; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;">
<span style="color: #444444; font-family: Open Sans, serif;"><span style="font-size: 15px;"><br /></span></span></div>
<div>
<h2 style="background-color: white; border: 0px; color: #333333; font-family: "Open Sans", sans-serif; font-size: 38px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-weight: normal; line-height: 1.2; margin: 0px; outline: 0px; padding: 0px 0px 18px; vertical-align: baseline;">
Example code:</h2>
<pre style="background-color: white; border: 1px solid rgb(234, 234, 234); color: #444444; font-family: "Courier 10 Pitch", Courier, monospace; font-size: 14px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 1.4; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; vertical-align: baseline; white-space: pre-wrap;">git clone https://github.com/codelectron/codelectron_projects
cd codelectron_projects/Rpi/OLED
python first.py</pre>
<div style="background-color: white; border: 0px; color: #444444; font-family: "Open Sans", serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 1.6; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;">
Now I will run the first python example first.py</div>
<div style="background-color: white; border: 0px; color: #444444; font-family: "Open Sans", serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 1.6; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;">
<br /></div>
<div style="background-color: white; border: 0px; color: #444444; font-family: "Open Sans", serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 1.6; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;">
Follow instructions on the <a href="http://codelectron.com/setup-oled-display-raspberry-pi-python/">original post</a> ...</div>
<div style="background-color: white; border: 0px; color: #444444; font-family: "Open Sans", serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: 1.6; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;">
<br /></div>
</div>
</div>
<div>
<span style="color: #333333; font-family: Helvetica Neue, Helvetica, Arial, sans-serif;"><span style="font-size: 14px;"><br /></span></span></div>
<div>
<span style="color: #333333; font-family: Helvetica Neue, Helvetica, Arial, sans-serif;"><span style="font-size: 14px;"><br /></span></span></div>
<div>
<br /></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7376522.post-55310147260458282322020-03-16T15:59:00.001-03:002020-03-16T15:59:06.587-03:00Raspberry Pi LCD Display: 16×2 Characters Display (HD44780)<a href="https://tutorials-raspberrypi.com/raspberry-pi-lcd-display-16x2-characters-display-hd44780/">https://tutorials-raspberrypi.com/raspberry-pi-lcd-display-16x2-characters-display-hd44780/</a><br />
<br />
<div style="background-color: white; box-sizing: border-box; color: #1b1c2a; font-family: Lato, sans-serif; font-size: 17px; line-height: 1.618; outline: transparent; padding: 0px 0px 20px;">
<span class="mt-first-letter" style="box-sizing: border-box; outline: transparent;">T</span>he most common controller of multi-line character displays is the HD44780. There are several Raspberry Pi LCD display sizes (8×2, 16×2, 20×4, etc.) that run with it. In this tutorial, I will show how to use a 16×2 character display and also run a test script.</div>
<div style="background-color: white; box-sizing: border-box; color: #1b1c2a; font-family: Lato, sans-serif; font-size: 17px; line-height: 1.618; outline: transparent; padding: 0px 0px 20px;">
<span id="more-5084" style="box-sizing: border-box; outline: transparent;"></span></div>
<div style="background-color: white; box-sizing: border-box; color: #1b1c2a; font-family: Lato, sans-serif; font-size: 17px; line-height: 1.618; outline: transparent; padding: 0px 0px 20px;">
A few words said in advance: In this tutorial, all pins are addressed directly, which occupies quite a few GPIOs. Another method is <a href="https://tutorials-raspberrypi.com/control-a-raspberry-pi-hd44780-lcd-display-via-i2c/" rel="noopener" style="background-color: transparent; box-sizing: border-box; color: #60b22e; cursor: pointer !important; outline: transparent; text-decoration-line: none; transition: all 0.1s ease-out 0s !important;" target="_blank">the connection via I2C</a>.</div>
<div style="background-color: white; box-sizing: border-box; color: #1b1c2a; font-family: Lato, sans-serif; font-size: 17px; line-height: 1.618; outline: transparent; padding: 0px 0px 20px;">
<br /></div>
<h2 style="background-color: white; box-sizing: border-box; color: #000113; font-family: Lato, sans-serif; font-size: 36px; line-height: initial; margin: 0px; outline: transparent; padding: 20px 0px; transition: all 0.2s ease-in-out 0s !important;">
Required Hardware Parts</h2>
<div style="background-color: white; box-sizing: border-box; color: #1b1c2a; font-family: Lato, sans-serif; font-size: 17px; line-height: 1.618; outline: transparent; padding: 0px 0px 20px;">
The following parts are required:</div>
<ul style="background-color: white; box-sizing: border-box; font-family: Lato, sans-serif; font-size: 17px; margin: 0px 0px 20px 20px; outline: transparent; padding: 0px;">
<li style="box-sizing: border-box; outline: transparent;">Display <a href="https://www.amazon.com/s?k=HD44780&ref=nb_sb_noss_2&tag=754u-20" rel="noopener" style="background-color: transparent; box-sizing: border-box; color: #60b22e; cursor: pointer !important; outline: transparent; text-decoration-line: none; transition: all 0.1s ease-out 0s !important;" target="_blank">with a HD44780 controller</a><span style="box-sizing: border-box; outline: transparent;">*</span></li>
<li style="box-sizing: border-box; outline: transparent;"><a href="https://www.amazon.com/s?k=pin+jumper+cable&crid=QT1NIP8Q2CN&sprefix=pin+jumper+c%2Caps%2C257&ref=nb_sb_ss_i_1_12&tag=754u-20" rel="noopener" style="background-color: transparent; box-sizing: border-box; color: #60b22e; cursor: pointer !important; outline: transparent; text-decoration-line: none; transition: all 0.1s ease-out 0s !important;" target="_blank">Jumper Cable</a><span style="box-sizing: border-box; outline: transparent;">*</span></li>
<li style="box-sizing: border-box; outline: transparent;">A resistor or alternatively a <a href="https://www.amazon.com/s?k=potentiometer&ref=nb_sb_noss_1&tag=754u-20" rel="noopener" style="background-color: transparent; box-sizing: border-box; color: #60b22e; cursor: pointer !important; outline: transparent; text-decoration-line: none; transition: all 0.1s ease-out 0s !important;" target="_blank">potentiometer</a><span style="box-sizing: border-box; outline: transparent;">*</span> (to control the backlight)</li>
<li style="box-sizing: border-box; outline: transparent;"><a data-amzn-asin="Breadboard" href="https://www.amazon.com/s?k=Breadboard&ref=nb_sb_noss_2&tag=754u-20" rel="noopener" style="background-color: transparent; box-sizing: border-box; color: #60b22e; cursor: pointer !important; outline: transparent; text-decoration-line: none; transition: all 0.1s ease-out 0s !important;" target="_blank">Breadboard</a><span style="box-sizing: border-box; outline: transparent;">*</span></li>
</ul>
<div style="background-color: white; box-sizing: border-box; color: #1b1c2a; font-family: Lato, sans-serif; font-size: 17px; line-height: 1.618; outline: transparent; padding: 0px 0px 20px;">
<br /></div>
<h2 style="background-color: white; box-sizing: border-box; color: #000113; font-family: Lato, sans-serif; font-size: 36px; line-height: initial; margin: 0px; outline: transparent; padding: 20px 0px; transition: all 0.2s ease-in-out 0s !important;">
Setup</h2>
<div style="background-color: white; box-sizing: border-box; color: #1b1c2a; font-family: Lato, sans-serif; font-size: 17px; line-height: 1.618; outline: transparent; padding: 0px 0px 20px;">
In this case, I refer to the pin numbering (GPIO.BOARD), not to the GPIO numbers:</div>
<div style="background-color: white; box-sizing: border-box; color: #1b1c2a; font-family: Lato, sans-serif; font-size: 17px; line-height: 1.618; outline: transparent; padding: 0px 0px 20px;">
<br /></div>
<table border="1" style="background-color: white; border-bottom: 1px solid rgb(237, 237, 237); border-collapse: collapse; border-spacing: 0px; box-sizing: border-box; color: black; font-family: Lato, sans-serif; font-size: 17px; height: 462px; margin-bottom: 40px; outline: transparent; width: 624px;"><tbody style="box-sizing: border-box; outline: transparent;">
<tr style="background-color: #ebf7f8; box-sizing: border-box; outline: transparent;"><th style="background-color: #88abc2; box-sizing: border-box; outline: transparent; padding-left: 10px; vertical-align: text-top;">LCD Pin</th><th style="background-color: #88abc2; box-sizing: border-box; outline: transparent; padding-left: 10px; vertical-align: text-top;">to RPi GPIO</th><th style="background-color: #88abc2; box-sizing: border-box; outline: transparent; padding-left: 10px; vertical-align: text-top;">Description</th></tr>
<tr style="background-color: #d0e0eb; box-sizing: border-box; outline: transparent;"><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> 1. VSS</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> Pin 6 (GND)</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;">Supply Voltage (ground)</td></tr>
<tr style="background-color: #ebf7f8; box-sizing: border-box; outline: transparent;"><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> 2. VDD</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> Pin 2 (5V)</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;">Supply Voltage 5V</td></tr>
<tr style="background-color: #d0e0eb; box-sizing: border-box; outline: transparent;"><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> 3. V0</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> Pin 6 (GND)</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;">Contrast Voltage</td></tr>
<tr style="background-color: #ebf7f8; box-sizing: border-box; outline: transparent;"><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> 4. RS</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> Pin 7 (GPIO4)</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;">Register Selection (0: Command Register, 1: Data Register)</td></tr>
<tr style="background-color: #d0e0eb; box-sizing: border-box; outline: transparent;"><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> 5. RW</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> Pin 6 (GND)</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> Read/Write (0: Write Modus, 1: Read Modus)</td></tr>
<tr style="background-color: #ebf7f8; box-sizing: border-box; outline: transparent;"><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> 6. E</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> Pin 11 (GPIO17)</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;">Clock Edge</td></tr>
<tr style="background-color: #d0e0eb; box-sizing: border-box; outline: transparent;"><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> 7. D0</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> –</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;">Data Line 0</td></tr>
<tr style="background-color: #ebf7f8; box-sizing: border-box; outline: transparent;"><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> 8. D1</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> –</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;">Data Line 1</td></tr>
<tr style="background-color: #d0e0eb; box-sizing: border-box; outline: transparent;"><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> 9. D2</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> –</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;">Data Line 2</td></tr>
<tr style="background-color: #ebf7f8; box-sizing: border-box; outline: transparent;"><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> 10. D3</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> –</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;">Data Line 3</td></tr>
<tr style="background-color: #d0e0eb; box-sizing: border-box; outline: transparent;"><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> 11. D4</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> Pin 12 (GPIO18)</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;">Data Line 4</td></tr>
<tr style="background-color: #ebf7f8; box-sizing: border-box; outline: transparent;"><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> 12. D5</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> Pin 15 (GPIO22)</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;">Data Line 5</td></tr>
<tr style="background-color: #d0e0eb; box-sizing: border-box; outline: transparent;"><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> 13. D6</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> Pin 16 (GPIO23)</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;">Data Line 6</td></tr>
<tr style="background-color: #ebf7f8; box-sizing: border-box; outline: transparent;"><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> 14. D7</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> Pin 18 (GPIO24)</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;">Data Line 7</td></tr>
<tr style="background-color: #d0e0eb; box-sizing: border-box; outline: transparent;"><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> 15. A</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> Pin 2 (5V) (mit Poti)</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;">Backlight Anode</td></tr>
<tr style="background-color: #ebf7f8; box-sizing: border-box; outline: transparent;"><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> 16. K</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;"> Pin 6 (GND)</td><td style="border-top: 1px solid rgb(237, 237, 237); box-sizing: border-box; outline: transparent; padding: 6px 10px; vertical-align: text-top;">Backlight Cathode</td></tr>
</tbody></table>
<div style="background-color: white; box-sizing: border-box; color: #1b1c2a; font-family: Lato, sans-serif; font-size: 17px; line-height: 1.618; outline: transparent; padding: 0px 0px 20px;">
<br /></div>
<div style="background-color: white; box-sizing: border-box; color: #1b1c2a; font-family: Lato, sans-serif; font-size: 17px; line-height: 1.618; outline: transparent; padding: 0px 0px 20px;">
The backlight can be adjusted by turning the potentiometer. Some displays cannot stand 5V for the backlight, so you should either look at the datasheet or at least always connect a 470Ω – 510Ω resistor.</div>
<div style="background-color: white; box-sizing: border-box; color: #1b1c2a; font-family: Lato, sans-serif; font-size: 17px; line-height: 1.618; outline: transparent; padding: 0px 0px 20px;">
<br /></div>
<h2 style="background-color: white; box-sizing: border-box; color: #000113; font-family: Lato, sans-serif; font-size: 36px; line-height: initial; margin: 0px; outline: transparent; padding: 20px 0px; transition: all 0.2s ease-in-out 0s !important;">
Testing the Raspberry Pi LCD Display</h2>
<div style="background-color: white; box-sizing: border-box; color: #1b1c2a; font-family: Lato, sans-serif; font-size: 17px; line-height: 1.618; outline: transparent; padding: 0px 0px 20px;">
You can either view the script I used here or just download it and try.</div>
<pre style="background: rgb(240, 240, 240); box-sizing: border-box; font-family: monospace, monospace; font-size: 17px; margin-bottom: 20px; outline: transparent; overflow: auto;">wget http://www.tutorials-raspberrypi.de/wp-content/uploads/scripts/hd44780_test.py
chmod +x hd44780_test.py
python hd44780_test.py</pre>
<div style="background-color: white; box-sizing: border-box; color: #1b1c2a; font-family: Lato, sans-serif; font-size: 17px; line-height: 1.618; outline: transparent; padding: 0px 0px 20px;">
If you have chosen a different display or pin assignment, do not forget to adapt the script.</div>
<div style="background-color: white; box-sizing: border-box; color: #1b1c2a; font-family: Lato, sans-serif; font-size: 17px; line-height: 1.618; outline: transparent; padding: 0px 0px 20px;">
Through the simple control, you can create different scripts, which, for example, show the status of the Pi.</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-7376522.post-73249877598475374902020-03-12T15:57:00.000-03:002020-03-12T15:57:58.788-03:00Arm debian based distroEasy and simple, tested on BananaPi M1.<br />
<br />
<a href="https://www.armbian.com/bananapi/">https://www.armbian.com/bananapi/</a><br />
<a href="https://www.armbian.com/">https://www.armbian.com/</a><br />
<br />
worth trying<br />
<br />
<br />Unknownnoreply@blogger.com0