├── .editorconfig ├── .eslintrc.json ├── .github └── workflows │ └── gatsby.yml ├── .gitignore ├── .prettierrc ├── LICENSE ├── README.md ├── csv.js ├── gatsby-config.js ├── gatsby-node.js ├── lessons ├── ansible.md ├── cht.sh.md ├── dotfile-ansible-summary.md ├── dotfile-management.md ├── fzf.md ├── git.md ├── here-we-go.md ├── images │ ├── alactritty.jpeg │ ├── authenticator.png │ ├── bare-repo.png │ ├── emacs-learning.png │ ├── golden-hammer.png │ ├── guido.png │ ├── hard-soft-skillz.png │ ├── i-am-science.png │ ├── kitty.jpeg │ ├── logo.svg │ ├── prod-hard-soft-skillz.png │ ├── soft-skillz.png │ ├── there-is-another-way.jpg │ ├── tmux-server.png │ ├── too-many-icons.png │ ├── too-many-terms.png │ ├── ubuntu-vscode.webp │ ├── vim-learning.png │ ├── what-the-talk.png │ ├── who-does-2-work-for.jpg │ └── yadm.png ├── inspiration.md ├── intro-2.md ├── intro.md ├── linux-core-utils.md ├── section-2.md ├── section-2_end.md ├── section-3.md ├── section1_end.md ├── snippets-future.md ├── terminal-multiplexing-2.md ├── terminal-multiplexing-3.md ├── terminal-multiplexing-4.md ├── terminal-multiplexing-5.md ├── terminal-multiplexing-6.md ├── terminal-multiplexing-7.md ├── terminal-multiplexing.md ├── window-manager.md └── zsh.md ├── package-lock.json ├── package.json ├── src ├── components │ └── TOCCard.js ├── layouts │ ├── Footer.css │ ├── Footer.js │ ├── corner-image.svg │ ├── github-social.svg │ ├── index.css │ ├── index.js │ ├── linkedin-social.svg │ ├── twitter-social.svg │ └── variables.css ├── pages │ ├── 404.js │ └── index.js ├── templates │ └── lessonTemplate.js └── util │ └── helpers.js └── static ├── author.jpg ├── author.png ├── corner-image-active.svg ├── corner-image-inactive.svg ├── courseImage.png ├── posterframe.jpg ├── thumb.jpg └── thumb.webp /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | charset = utf-8 7 | indent_style = space 8 | indent_size = 2 -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "eslint:recommended", 4 | "plugin:import/errors", 5 | "plugin:react/recommended", 6 | "plugin:jsx-a11y/recommended", 7 | "prettier", 8 | "prettier/react" 9 | ], 10 | "rules": { 11 | "react/prop-types": 0, 12 | "jsx-a11y/label-has-for": 0, 13 | "no-console": 1 14 | }, 15 | "plugins": ["react", "import", "jsx-a11y"], 16 | "parser": "babel-eslint", 17 | "parserOptions": { 18 | "ecmaVersion": 2018, 19 | "sourceType": "module", 20 | "ecmaFeatures": { 21 | "jsx": true 22 | } 23 | }, 24 | "env": { 25 | "es6": true, 26 | "browser": true, 27 | "node": true 28 | }, 29 | "settings": { 30 | "react": { 31 | "version": "16.5.2" 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /.github/workflows/gatsby.yml: -------------------------------------------------------------------------------- 1 | name: Deploy Gatsby Site to GitHub Pages 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | deploy: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@master 13 | - name: npm install and build 14 | run: | 15 | npm install 16 | npm run build 17 | - name: Deploy site to gh-pages branch 18 | uses: crazy-max/ghaction-github-pages@v2 19 | with: 20 | target_branch: gh-pages 21 | build_dir: public 22 | env: 23 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Project dependencies 2 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git 3 | node_modules 4 | .cache/ 5 | # Build directory 6 | public/ 7 | .DS_Store 8 | yarn-error.log 9 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | ## creative commons 2 | 3 | # Attribution-NonCommercial 4.0 International 4 | 5 | Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. 6 | 7 | ### Using Creative Commons Public Licenses 8 | 9 | Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. 10 | 11 | * __Considerations for licensors:__ Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. [More considerations for licensors](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensors). 12 | 13 | * __Considerations for the public:__ By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. [More considerations for the public](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensees). 14 | 15 | ## Creative Commons Attribution-NonCommercial 4.0 International Public License 16 | 17 | By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. 18 | 19 | ### Section 1 – Definitions. 20 | 21 | a. __Adapted Material__ means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. 22 | 23 | b. __Adapter's License__ means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. 24 | 25 | c. __Copyright and Similar Rights__ means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. 26 | 27 | d. __Effective Technological Measures__ means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. 28 | 29 | e. __Exceptions and Limitations__ means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. 30 | 31 | f. __Licensed Material__ means the artistic or literary work, database, or other material to which the Licensor applied this Public License. 32 | 33 | g. __Licensed Rights__ means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. 34 | 35 | h. __Licensor__ means the individual(s) or entity(ies) granting rights under this Public License. 36 | 37 | i. __NonCommercial__ means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange. 38 | 39 | j. __Share__ means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. 40 | 41 | k. __Sui Generis Database Rights__ means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. 42 | 43 | l. __You__ means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. 44 | 45 | ### Section 2 – Scope. 46 | 47 | a. ___License grant.___ 48 | 49 | 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: 50 | 51 | A. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and 52 | 53 | B. produce, reproduce, and Share Adapted Material for NonCommercial purposes only. 54 | 55 | 2. __Exceptions and Limitations.__ For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 56 | 57 | 3. __Term.__ The term of this Public License is specified in Section 6(a). 58 | 59 | 4. __Media and formats; technical modifications allowed.__ The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. 60 | 61 | 5. __Downstream recipients.__ 62 | 63 | A. __Offer from the Licensor – Licensed Material.__ Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. 64 | 65 | B. __No downstream restrictions.__ You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. 66 | 67 | 6. __No endorsement.__ Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). 68 | 69 | b. ___Other rights.___ 70 | 71 | 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. 72 | 73 | 2. Patent and trademark rights are not licensed under this Public License. 74 | 75 | 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes. 76 | 77 | ### Section 3 – License Conditions. 78 | 79 | Your exercise of the Licensed Rights is expressly made subject to the following conditions. 80 | 81 | a. ___Attribution.___ 82 | 83 | 1. If You Share the Licensed Material (including in modified form), You must: 84 | 85 | A. retain the following if it is supplied by the Licensor with the Licensed Material: 86 | 87 | i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); 88 | 89 | ii. a copyright notice; 90 | 91 | iii. a notice that refers to this Public License; 92 | 93 | iv. a notice that refers to the disclaimer of warranties; 94 | 95 | v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; 96 | 97 | B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and 98 | 99 | C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. 100 | 101 | 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. 102 | 103 | 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. 104 | 105 | 4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License. 106 | 107 | ### Section 4 – Sui Generis Database Rights. 108 | 109 | Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: 110 | 111 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only; 112 | 113 | b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and 114 | 115 | c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. 116 | 117 | For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. 118 | 119 | ### Section 5 – Disclaimer of Warranties and Limitation of Liability. 120 | 121 | a. __Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.__ 122 | 123 | b. __To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.__ 124 | 125 | c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. 126 | 127 | ### Section 6 – Term and Termination. 128 | 129 | a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. 130 | 131 | b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 132 | 133 | 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 134 | 135 | 2. upon express reinstatement by the Licensor. 136 | 137 | For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. 138 | 139 | c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. 140 | 141 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. 142 | 143 | ### Section 7 – Other Terms and Conditions. 144 | 145 | a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. 146 | 147 | b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. 148 | 149 | ### Section 8 – Interpretation. 150 | 151 | a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. 152 | 153 | b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. 154 | 155 | c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. 156 | 157 | d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. 158 | 159 | > Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at [creativecommons.org/policies](http://creativecommons.org/policies), Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. 160 | > 161 | > Creative Commons may be contacted at creativecommons.org -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

Developer Productivity Course by ThePrimeagen


2 | 3 |

4 | As taught by ThePrimeagen for Frontend Masters 5 |

6 | 7 |

8 | 📝 Course Website: Developer Productivity 9 |

10 | 11 | How can you stay productive across multiple machines, multiple projects, and multiple technologies? By setting up a professional toolchain, you’ll get more work done with less effort. We’ll start with using Ansible to quickly build a fresh dev environment. Next, you’ll how to optimize your workflow using tmux and advanced features of git. We’ll finish up by going over Linux Core Utils that can make your life as a developer easier, and what the future of programming could look like! 12 | 13 | ## License 14 | 15 | The **code** is this repo is licensed under the Apache 2.0 license. 16 | 17 | The **content** is this repo is licensed under the CC-BY-NC-4.0 license. 18 | -------------------------------------------------------------------------------- /csv.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs").promises; 2 | const path = require("path"); 3 | const fm = require("front-matter"); 4 | const isUrl = require("is-url-superb"); 5 | const parseLinks = require("parse-markdown-links"); 6 | const { sorter } = require("./src/util/helpers"); 7 | const mdDir = process.env.MARKDOWN_DIR || path.join(__dirname, "lessons/"); 8 | const outputPath = 9 | process.env.OUTPUT_CSV_PATH || path.join(__dirname, "public/lessons.csv"); 10 | const linksOutputPath = 11 | process.env.LINKS_CSV_PATH || path.join(__dirname, "public/links.csv"); 12 | 13 | async function createCsv() { 14 | console.log(`making the markdown files into a CSV from ${mdDir}`); 15 | 16 | // get paths 17 | const allFiles = await fs.readdir(mdDir); 18 | const files = allFiles.filter(filePath => filePath.endsWith(".md")); 19 | 20 | // read paths, get buffers 21 | const buffers = await Promise.all( 22 | files.map(filePath => fs.readFile(path.join(mdDir, filePath))) 23 | ); 24 | 25 | // make buffers strings 26 | const contents = buffers.map(content => content.toString()); 27 | 28 | // make strings objects 29 | let frontmatters = contents.map(fm); 30 | 31 | // find all attribute keys 32 | const seenAttributes = new Set(); 33 | frontmatters.forEach(item => { 34 | Object.keys(item.attributes).forEach(attr => seenAttributes.add(attr)); 35 | }); 36 | const attributes = Array.from(seenAttributes.values()); 37 | 38 | if (attributes.includes("order")) { 39 | frontmatters = frontmatters.sort(sorter); 40 | } 41 | 42 | // get all data into an array 43 | let rows = frontmatters.map(item => { 44 | const row = attributes.map(attr => 45 | item.attributes[attr] ? JSON.stringify(item.attributes[attr]) : "" 46 | ); 47 | return row; 48 | }); 49 | 50 | // header row must be first row 51 | rows.unshift(attributes); 52 | 53 | // join into CSV string 54 | const csv = rows.map(row => row.join(",")).join("\n"); 55 | 56 | // write file out 57 | await fs.writeFile(outputPath, csv); 58 | 59 | console.log(`Wrote ${rows.length} rows to ${outputPath}`); 60 | 61 | // make links csv 62 | let longestLength = 0; 63 | let linksArray = frontmatters.map(row => { 64 | const links = parseLinks(row.body).filter(isUrl); 65 | longestLength = longestLength > links.length ? longestLength : links.length; 66 | const newRow = [row.attributes.order, row.attributes.title, ...links]; 67 | return newRow; 68 | }); 69 | 70 | if (longestLength) { 71 | // add title row 72 | linksArray = linksArray.map(array => { 73 | const lengthToFill = longestLength + 2 - array.length; 74 | return array.concat(Array.from({ length: lengthToFill }).fill("")); 75 | }); 76 | 77 | linksArray.unshift( 78 | ["order", "title"].concat( 79 | Array.from({ length: longestLength }).map((_, index) => `link${index}`) 80 | ) 81 | ); 82 | 83 | // join into CSV string 84 | const linksCsv = linksArray.map(row => row.join(",")).join("\n"); 85 | 86 | // write file out 87 | await fs.writeFile(linksOutputPath, linksCsv); 88 | 89 | console.log(`Wrote ${linksArray.length} rows to ${linksOutputPath}`); 90 | } 91 | } 92 | 93 | createCsv(); 94 | -------------------------------------------------------------------------------- /gatsby-config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | siteMetadata: { 3 | title: "Developer Productivity", 4 | subtitle: "The skills you need to succeed", 5 | author: "ThePrimeagen", 6 | authorSubtitle: "https://twitch.tv/ThePrimeagen", 7 | authorImage: "author.jpg", // this image should go in /static 8 | courseImage: "courseImage.png", // this also should go in /static 9 | twitter: "https://twitter.com/ThePrimeagen", 10 | linkedin: "", 11 | youtube: "https://youtube.com/ThePrimeagen", 12 | twitch: "https://twitch.tv/ThePrimeagen", 13 | github: "https://github.com/ThePrimeagen", 14 | description: 15 | "Developer Productivity helps every engineer take their career from junior to senior fast.", 16 | keywords: [ 17 | "Programming", 18 | "Linux", 19 | "Developer", 20 | "Productivity", 21 | "Bash", 22 | "Git", 23 | "Vim", 24 | "NeoVim", 25 | "tmux", 26 | ], 27 | }, 28 | pathPrefix: "dev-productivity", 29 | plugins: [ 30 | { 31 | resolve: "gatsby-plugin-react-svg", 32 | options: { 33 | rule: { 34 | include: /src/, 35 | }, 36 | }, 37 | }, 38 | `gatsby-plugin-sharp`, 39 | `gatsby-plugin-layout`, 40 | { 41 | resolve: `gatsby-source-filesystem`, 42 | options: { 43 | path: `${__dirname}/lessons`, 44 | name: "markdown-pages", 45 | }, 46 | }, 47 | `gatsby-plugin-react-helmet`, 48 | { 49 | resolve: `gatsby-transformer-remark`, 50 | options: { 51 | plugins: [ 52 | `gatsby-remark-autolink-headers`, 53 | `gatsby-remark-copy-linked-files`, 54 | `gatsby-remark-prismjs`, 55 | { 56 | resolve: `gatsby-remark-images`, 57 | options: { 58 | maxWidth: 800, 59 | linkImagesToOriginal: true, 60 | sizeByPixelDensity: false, 61 | }, 62 | }, 63 | ], 64 | }, 65 | }, 66 | ], 67 | }; 68 | -------------------------------------------------------------------------------- /gatsby-node.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | 3 | exports.createPages = ({ actions, graphql }) => { 4 | const { createPage } = actions; 5 | 6 | const lessonTemplate = path.resolve(`src/templates/lessonTemplate.js`); 7 | 8 | return graphql(` 9 | { 10 | allMarkdownRemark( 11 | sort: { order: DESC, fields: [frontmatter___order] } 12 | limit: 1000 13 | ) { 14 | edges { 15 | node { 16 | excerpt(pruneLength: 250) 17 | html 18 | id 19 | frontmatter { 20 | order 21 | path 22 | title 23 | } 24 | } 25 | } 26 | } 27 | } 28 | `).then(result => { 29 | if (result.errors) { 30 | return Promise.reject(result.errors); 31 | } 32 | 33 | result.data.allMarkdownRemark.edges.forEach(({ node }) => { 34 | createPage({ 35 | path: node.frontmatter.path, 36 | component: lessonTemplate 37 | }); 38 | }); 39 | }); 40 | }; 41 | -------------------------------------------------------------------------------- /lessons/ansible.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/ansible-as-a-workstation" 3 | title: "Ansible" 4 | order: "8A" 5 | section: "Jump Start" 6 | description: "Downloading all that you forgot" 7 | icon: "dumpster-fire" 8 | --- 9 | 10 | ### When I started this talk I thought this was the worst part 11 | THE MOST BORING 12 | 13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | 26 | ### The Problem Statement 27 | * I have new computer (not a problem) and I want zsh installed (the problem) 28 | 29 | ``` 30 | sudo apt install zsh 31 | ``` 32 | 33 | ``` 34 | # the thing we forget to do 35 | chsh -s `which zsh` # when typing this I did chsh zsh 36 | ``` 37 | 38 | Please don't make fun of me. oh-my-zsh does give you a -1 BTW 39 | 40 | ``` 41 | curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh 42 | ``` 43 | 44 | Add autosuggest to the plugins 45 | 46 | ``` 47 | plugins=(git zsh-autosuggestions) 48 | ``` 49 | 50 | ``` 51 | git clone https://github.com/zsh-users/zsh-autosuggestions.git ~/.oh-my-zsh/plugins/zsh-autosuggestions 52 | ``` 53 | 54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 | 67 | ### The Problem Statement 68 | I have a new computer (it is the problem) 69 | 70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 | 83 | Installing the things I need 84 | 85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 | 98 | SSH Keys??? 99 | 100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 | 113 | ### So if only there was a solution to all of these problems. 114 | 115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 | 128 | ### ANSIBLE!! 129 | Isn't that a cloud configuration thing?? Something like Koobernetes? 130 | 131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 | 144 | ### So lets talk about the anatomy of ansible 145 | Top Level 146 | ``` 147 | - hosts: localhost 148 | become: true 149 | pre_tasks: ... 150 | vars: ... 151 | tasks: ... 152 | ``` 153 | 154 | Task 155 | ``` 156 | - name: string 157 | _SOME_ACTION_ 158 | tags: 159 | - list 160 | - of 161 | - tags 162 | ``` 163 | 164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 | 177 | ### Lets create the zsh install but with ansible 178 | 179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 | 192 | * Install nodejs and npm 193 | * Install n node manager 194 | 195 | #### NOTE!! 196 | ``` 197 | ... 198 | - name: Update cache 199 | apt: 200 | update_cache: true 201 | ... 202 | ``` 203 | 204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 | 217 | ### BUT I HAVE SO MANY TASKS!!! 218 | 219 | You can reduce the main file by having task files! Lets do that plus add some 220 | more programs. 221 | 222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 | 235 | ### Ohh wait 236 | 237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 | 250 | ### You can see where this is going. 251 | Every time you do some installation of a new item, put it in ansible. Install 252 | it through ansible, add tags, etc etc. 253 | 254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 | 267 | ### But Prime you told me this was exciting. 268 | 269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 | 282 | ### SSH? 283 | 284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 | 297 | ### Lets change gears a bit! 298 | SSH Keys. The worst thing ever. The best thing ever.
299 | 300 | Ansible comes with something called `ansible-vault`. My guess is that this 301 | will be the greatest thing you take away from today.
302 | 303 | Lets learn by example! Lets encrypt and decrypt shortly. 304 | 305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 | 318 | ### Decrypting... is always manual? 319 | no. 320 | 321 | Here is the _exact_ (well sort of) code that I use to work with vault'd items. 322 | 323 | ``` 324 | # local.yml 325 | ... 326 | vars: 327 | source_key: "./.ssh/id_rsa" 328 | dest_key: "{{ lookup('env', 'HOME') }}/.ssh/id_rsa" 329 | ... 330 | ``` 331 | 332 | ``` 333 | # ssh file 334 | - name: Ensure .ssh directory exists. 335 | become_user: root 336 | file: 337 | dest: "{{ dest_key | dirname }}" 338 | mode: 0700 339 | state: directory 340 | tags: 341 | - dotfiles 342 | - ssh 343 | - name: Install ssh key 344 | become_user: root 345 | copy: 346 | src: "{{ source_key }}" 347 | dest: "{{ dest_key }}" 348 | mode: 0600 349 | tags: 350 | - dotfiles 351 | - ssh 352 | - name: Set authorized key took from file 353 | authorized_key: 354 | user: "{{ lookup('env', 'USER') }}" 355 | state: present 356 | key: "{{ lookup('env', 'HOME') }}/.ssh/id_rsa.pub" 357 | tags: 358 | - dotfiles 359 | - ssh 360 | ``` 361 | 362 | ``` 363 | # clone down the dotfiles and recurse the submodules (which are private) 364 | - name: Cloning .dotfiles 365 | ansible.builtin.git: 366 | repo: 'git@github.com:ThePrimeagen/.dotfiles.git' 367 | dest: "{{ lookup('env', 'HOME') }}/.dotfiles" 368 | recursive: yes 369 | update: yes 370 | accept_hostkey: yes 371 | version: master 372 | tags: 373 | - dotfiles 374 | ``` 375 | 376 | ``` 377 | ansible-playbook -t dotfiles local.yml --ask-become-pass --ask-vault-pass 378 | ``` 379 | 380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 | 393 | ### Bonus Content 394 | 395 | So we talked about the vault. What else could we vault other than ssh keys? 396 | 397 |
398 |
399 |
400 |
401 |
402 |
403 |
404 |
405 |
406 |
407 |
408 |
409 | 410 | ![Authenticator](./images/authenticator.png) 411 | 412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 | 425 | ### How did you just dotfile that easy? 426 | 427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 |
438 |
439 | -------------------------------------------------------------------------------- /lessons/cht.sh.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/cht.sh" 3 | title: "Syntax..." 4 | order: "37A" 5 | section: "CLI - Fun" 6 | description: "Google be gone." 7 | icon: "dumpster-fire" 8 | --- 9 | 10 | ### Common problem we face as developers? 11 | 12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | 25 | ### Whats that splice interface to an array in javascript? 26 | ### How do I tokenize a string in c? 27 | ### How do I create a class in cpp? 28 | ### What's the syntax for an enum in typescript? 29 | 30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 | 43 | These are questions we all ask ourselves, and often to solve these for the 44 | first or second time is with google.
45 | 46 | But what if we don't need to even open up a browser?
47 | 48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | 61 | ### Cheat Sheet 62 | 63 | Cheat sheet has a lot to offer! Not only just questions about languages but 64 | tons of examples around core utils, language specifics, and a TL/DR on learning 65 | languages. 66 | 67 | ``` 68 | curl cht.sh/find~exec 69 | ``` 70 | 71 | ``` 72 | curl cht.sh/javascript/splice+array 73 | ``` 74 | 75 | ``` 76 | curl cht.sh/typescript/enum 77 | ``` 78 | 79 | ``` 80 | curl cht.sh/typescript/enum+string 81 | ``` 82 | 83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 | 96 | #### Learning 97 | ``` 98 | curl cht.sh/golang/:learn 99 | ``` 100 | 101 | ``` 102 | curl cht.sh/golang/:learn+slice 103 | ``` 104 | 105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 | 118 | ### HOW DID YOU JUST COPY PASTA? 119 | #### Usability Tip 120 | `-[` goes into vi mode 121 | 122 | this for the copy/paste in tmuxrc 123 | ``` 124 | set-window-option -g mode-keys vi 125 | bind -T copy-mode-vi v send-keys -X begin-selection 126 | bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard' 127 | ``` 128 | 129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 | -------------------------------------------------------------------------------- /lessons/dotfile-ansible-summary.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/dotfile-system-setup-summary" 3 | title: "Dotfile and System Setup Summary" 4 | order: "12A" 5 | section: "Jump Start" 6 | description: "What did we learn from all this" 7 | icon: "dumpster-fire" 8 | --- 9 | 10 | ### YADM 11 | * repo, in the shape of your dotfiles, and it will install them for you 12 | ![YADM HomePage](./images/yadm.png) 13 | 14 | ``` 15 | yadm clone git@github.com:ThePrimeagen/dotfiles 16 | yadm add .config/nvim/plugins/lsp.vim 17 | ``` 18 | 19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | 36 | 37 | ### So what should I do? 38 | #### YADM vs Stow 39 | ##### Don't forget dotbot 40 | 41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | 58 | ### My summary 59 | 60 | As far as I can see YADM doesn't have a spot for me. Its simplier than 61 | ansible, but it doesn't provide the installation. Its more complex than stow, 62 | but it doesn't provide simplicity and the separation of concerns. 63 | 64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | 77 | ### Pros and Cons 78 | 79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 | -------------------------------------------------------------------------------- /lessons/dotfile-management.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/dotfile-management" 3 | title: "Dotfile Management!" 4 | order: "11A" 5 | section: "Jump Start" 6 | description: "Dotfiles can really suck to manage..." 7 | icon: "dumpster-fire" 8 | --- 9 | 10 | ### What is the problem we are solving? 11 | ask this everytime. 12 | 13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | 26 | 1. We want to configure the programs we love with our personal touch. 27 | 2. We want to be able to keep track and commit our changes over time. 28 | 3. I would prefer it to be any os compatible 29 | 30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 | 43 | #### Who here knows anything about dotfiles? 44 | 45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | 58 | ### Example of dotfiles 59 | lets do a little example 60 | 61 | ``` 62 | set tabstop=4 softtabstop=4 63 | set shiftwidth=4 64 | set expandtab 65 | set smartindent 66 | ``` 67 | 68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | 81 | ### There are three solutions that seem to popular 82 | * yadm 83 | * GNU/stow 84 | * dotbot 85 | 86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 | 99 | ### So lets talk about stow 100 | So I think stow is amazing. 101 | * Its very simple 102 | * It only manages symlinks 103 | * Which allows it to be OS and version-able 104 | 105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 | 118 | ### To install and follow along 119 | ``` 120 | sudo apt install stow 121 | ``` 122 | 123 | ``` 124 | brew install stow 125 | ``` 126 | 127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 | 140 | ### lets do some very basic examples 141 | 142 | * Stow'ing. Some terminology 143 | * Stow'ing our first file. 144 | * Stow'ing our first directory. 145 | * Stow'ing our two directories with similar paths 146 | * UN-Stow'ing 147 | * Stow'ing issues 148 | 149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 | 162 | ### So now that you know. 163 | I just have to know. How many tingles are you feeling? I am feeling all of 164 | them. 165 | 166 | * Or does it just feel complicated? Well lets work through the Ansible 167 | together! 168 | 169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 | 182 | ### I bet you want to talk about vim 183 | I can tell. You are eager. 184 | 185 | ![I am a scientist](./images/i-am-science.png) 186 | 187 | [Vim Fundamentals](https://frontendmasters.com/courses/vim-fundamentals/) 188 | 189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 | -------------------------------------------------------------------------------- /lessons/fzf.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/fzf" 3 | title: "FZF" 4 | order: "35A" 5 | section: "CLI - Fun" 6 | description: "The greatest fuzzy finder" 7 | icon: "dumpster-fire" 8 | --- 9 | 10 | ### There is another tool you _should_ know 11 | fzf 12 | 13 | I would of done a great dis-service not telling you about it. Its by Junegunn 14 | who also writes amazing vim plugins. 15 | 16 | ### You do have to install this tool 17 | * apt 18 | * brew 19 | * git clone && ./install 20 | 21 | ### There is a lot to it, but lets just have a simple example 22 | 23 | `demonstration begins` 24 | 25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | 38 | ### Recursive history search? Not a problem! 39 | 40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 | -------------------------------------------------------------------------------- /lessons/git.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/git" 3 | title: "Git - The cool parts" 4 | order: "50A" 5 | section: "Unix Fun" 6 | description: "How to use git to the max" 7 | icon: "dumpster-fire" 8 | --- 9 | 10 | The majority of you know about git is likely push / pull / rebase. There is a 11 | ton more, but today I wanted to focus on one of the most underrated git 12 | features out there. 13 | 14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | 27 | ### Git worktrees 28 | 29 | ![Even Guido](./images/guido.png) 30 | 31 | So what is a work tree? 32 | 33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | 46 | There are a lot of ways in which work trees are used, but I am going to show 47 | you how I work with them. Now you may want to read up on the other strategies 48 | if this is going to be something you use. 49 | 50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | 63 | First, checking out maybe a bit different than you are use to. You are going 64 | to use the `--bare` option when checking out. 65 | 66 | ``` 67 | git clone --bare git@github.com:ThePrimeagen/refactoring.nvim.git refactoring.nvim 68 | ``` 69 | 70 | Notice that I did name my checkout. When using `--bare` I notice that it 71 | always includes the `.git` in the folder name. 72 | 73 | ![Bare Repo](./images/bare-repo.png) 74 | 75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 | 88 | So what do we have available? 89 | 90 | ``` 91 | git worktree list 92 | ``` 93 | 94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | 107 | Lets check out the man page 108 | 109 | ``` 110 | man git-worktree 111 | ``` 112 | 113 | The first paragraph gives you the information you need to know, but a way I 114 | streamline getting the exact commands to run is using cht.sh 115 | 116 | ``` 117 | curl cht.sh/git~worktree 118 | ``` 119 | 120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 | 133 | Let's go over some use cases to showcase the differences. 134 | 135 | * check out branch 136 | * list branches 137 | * edit branch 138 | * check out another branch 139 | * make changes 140 | * stashing 141 | * rebasing 142 | 143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 | 156 | * Pros and cons 157 | 158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 | 171 | ### Bonus Content 172 | Tiktok styled bonus content here. 173 | 174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 | -------------------------------------------------------------------------------- /lessons/here-we-go.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/here-we-go" 3 | title: "Here we go!" 4 | order: "4A" 5 | section: "Introduction into Developer Productivity" 6 | description: "Lets get started" 7 | icon: "dumpster-fire" 8 | --- 9 | 10 | ### Everything we talk about today can be done in piecemeal 11 | 12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | 25 | ### A note on docker 26 | I will be using docker throughout this presentation, especially in the 27 | beginning, but you don't need to know about it. I use docker so that I can 28 | create clean environments instead of mutating my system to become clean. 29 | 30 | [ThePrimeagen's Ansible](https://github.com/ThePrimeagen/ansible) 31 | 32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | 45 | ### THIS IS THE MOMENT 46 | 47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | -------------------------------------------------------------------------------- /lessons/images/alactritty.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/lessons/images/alactritty.jpeg -------------------------------------------------------------------------------- /lessons/images/authenticator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/lessons/images/authenticator.png -------------------------------------------------------------------------------- /lessons/images/bare-repo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/lessons/images/bare-repo.png -------------------------------------------------------------------------------- /lessons/images/emacs-learning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/lessons/images/emacs-learning.png -------------------------------------------------------------------------------- /lessons/images/golden-hammer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/lessons/images/golden-hammer.png -------------------------------------------------------------------------------- /lessons/images/guido.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/lessons/images/guido.png -------------------------------------------------------------------------------- /lessons/images/hard-soft-skillz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/lessons/images/hard-soft-skillz.png -------------------------------------------------------------------------------- /lessons/images/i-am-science.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/lessons/images/i-am-science.png -------------------------------------------------------------------------------- /lessons/images/kitty.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/lessons/images/kitty.jpeg -------------------------------------------------------------------------------- /lessons/images/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lessons/images/prod-hard-soft-skillz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/lessons/images/prod-hard-soft-skillz.png -------------------------------------------------------------------------------- /lessons/images/soft-skillz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/lessons/images/soft-skillz.png -------------------------------------------------------------------------------- /lessons/images/there-is-another-way.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/lessons/images/there-is-another-way.jpg -------------------------------------------------------------------------------- /lessons/images/tmux-server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/lessons/images/tmux-server.png -------------------------------------------------------------------------------- /lessons/images/too-many-icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/lessons/images/too-many-icons.png -------------------------------------------------------------------------------- /lessons/images/too-many-terms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/lessons/images/too-many-terms.png -------------------------------------------------------------------------------- /lessons/images/ubuntu-vscode.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/lessons/images/ubuntu-vscode.webp -------------------------------------------------------------------------------- /lessons/images/vim-learning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/lessons/images/vim-learning.png -------------------------------------------------------------------------------- /lessons/images/what-the-talk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/lessons/images/what-the-talk.png -------------------------------------------------------------------------------- /lessons/images/who-does-2-work-for.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/lessons/images/who-does-2-work-for.jpg -------------------------------------------------------------------------------- /lessons/images/yadm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/lessons/images/yadm.png -------------------------------------------------------------------------------- /lessons/inspiration.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/inspiration" 3 | title: "Inspiration - Why Dev workflow" 4 | order: "3A" 5 | section: "Introduction into Developer Productivity" 6 | description: "The why behind the how" 7 | icon: "dumpster-fire" 8 | --- 9 | 10 | #### I have talked about this before, but why do I care? 11 | 12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | 25 | ![Emacs Learning Curve](./images/emacs-learning.png) 26 | 27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 | 40 | ![Vim Learning Curve](./images/vim-learning.png) 41 | 42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | 55 | ![I am a scientist](./images/i-am-science.png) 56 | 57 | [Vim Fundamentals](https://frontendmasters.com/courses/vim-fundamentals/) 58 | 59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 | 72 | ### Who am I? 73 | 74 | * I am priviledged enough to tell you I work at Netflix and work on Network 75 | Stuff (http2, ws, other ones in the works now). 76 | * I stream on [Twitch](twitch.tv/ThePrimeagen). 77 | * I make meme's and informative videos on [YT](youtube.com/ThePrimeagen) 78 | * Married to a beautiful wife 79 | * 4 kids 80 | 81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 | -------------------------------------------------------------------------------- /lessons/intro-2.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/intro-2" 3 | title: "Introduction: Life as a developer" 4 | order: "2A" 5 | section: "Introduction into Developer Productivity" 6 | description: "The productivity boosting developer course!" 7 | icon: "dumpster-fire" 8 | --- 9 | 10 | * My guess is that you are like... 11 | ![Ubuntu with vscode](./images/ubuntu-vscode.webp) 12 | 13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | 26 | 27 | * Terminals suck 28 | ![I would die if I saw this on my system, terminals](./images/too-many-terms.png) 29 | 30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 | 43 | 44 | * Window manangement sucks 45 | ![I would die if I saw this on my system](./images/too-many-icons.png) 46 | 47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | 60 | 61 | ### Search Fatigue\* 62 | Thank you for coming to my TedX talk 63 | 64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | 77 | ### I don't use VSCode btw 78 | 79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 | 92 | ![There is another way](./images/there-is-another-way.jpg) 93 | 94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | 107 | ### What is developer Productivity? 108 | 109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 | 122 | ![Soft](./images/soft-skillz.png) 123 | 124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 | 137 | ![hard](./images/hard-soft-skillz.png) 138 | 139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 | 152 | ![all](./images/prod-hard-soft-skillz.png) 153 | 154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 | 167 | #### Definition: All the things that separate you from working 168 | Not everything I talk about today will be for you. 169 | 170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 | 183 | #### BTW Factor 184 | 185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 | 198 | 199 | ### What are we talking about? 200 | ![Dante's Learning Inferno](./images/what-the-talk.png) 201 | 202 | -------------------------------------------------------------------------------- /lessons/intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/intro" 3 | title: "Introduction" 4 | order: "1A" 5 | section: "Introduction into Developer Productivity" 6 | description: "The productivity boosting developer course!" 7 | icon: "dumpster-fire" 8 | --- 9 | 10 | ### My First "Big" Interview 11 | * Explain the problem 12 | 13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | 26 | The length of knowledge is a measurement of its value. 27 | 28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | -------------------------------------------------------------------------------- /lessons/linux-core-utils.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/core-utils" 3 | title: "Linux Core Utils" 4 | order: "51A" 5 | section: "Unix Fun" 6 | description: "Got more out of the command line." 7 | icon: "dumpster-fire" 8 | --- 9 | 10 | ### Linux Core Utils 11 | Stop reinventing the wheel. 12 | 13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | 26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 | 39 | ### So what are core utils? 40 | * A set of programs that can make your life easier doing ad hoc tasks 41 | 42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | 55 | ### Great example (solution down below) 56 | 57 | Sometimes an example is great! Lets say that you want to count how many 58 | occurrences of each word exists within a file? 59 | 60 | Real example, YT subtitles. 61 | 62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 | 75 | I am curious, how many chose 76 | `awk`, `cat | sort | uniq`, or write a program? 77 | 78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 | 91 | Sum each line and display the max sum 92 | 93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 | 106 | I am curious again, how many chose to write a program? `awk`? `bc sort head` 107 | 108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 | 121 | ### Some other utils you should just know 122 | cat 123 |
124 | read 125 |
126 | grep 127 |
128 | tr 129 |
130 | echo 131 |
132 | 133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 | 146 | ### Free tips on using sed 147 | 148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 | -------------------------------------------------------------------------------- /lessons/section-2.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/section-2" 3 | title: "Section-2" 4 | order: "14A" 5 | section: "Section 2" 6 | description: "Going Deeper" 7 | icon: "dumpster-fire" 8 | --- 9 | 10 | ### The start of section 2 11 | If I had one word for section 2: Navigation. 12 | 13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | 30 | -------------------------------------------------------------------------------- /lessons/section-2_end.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/outro" 3 | title: "End of Section 2" 4 | order: "48A" 5 | section: "CLI - Fun" 6 | description: "Incredible to more incredible" 7 | icon: "dumpster-fire" 8 | --- 9 | 10 | ### Remember 11 | The goal is to provide the knowledge that is useful for a long time. 12 | 13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | -------------------------------------------------------------------------------- /lessons/section-3.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/section-3" 3 | title: "Section-3" 4 | order: "49A" 5 | section: "Section 3" 6 | description: "Software and tools" 7 | icon: "dumpster-fire" 8 | --- 9 | 10 | ### The start of section 3 11 | Tools and the future 12 | 13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /lessons/section1_end.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/the-end-section-1" 3 | title: "Section 1 Summary" 4 | order: "13A" 5 | section: "Jump Start" 6 | description: "The start of productivity" 7 | icon: "dumpster-fire" 8 | --- 9 | 10 | ### This is the end of section 1 11 | 12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | 29 | ### We talked ansible 30 | * It allows you to have a simple configuration that will work cross platform to 31 | install and execute what you need to get your computer going from 0 to 60. 32 | It has operating system dependent switches 33 | 34 | ### Stow 35 | * A simple symlink manager which makes for a great dotfile manager. 36 | 37 | ### Adopting a new mindset 38 | * You have to be willing to stick with it! Don't lose things because you get 39 | lazy 40 | 41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | 52 | ### If you did it today. It probably wont be right 53 | * This is why I made docker image with nothing in it to test the installation. 54 | 55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /lessons/snippets-future.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/the-editor-3" 3 | title: "Today and The Future" 4 | order: "72A" 5 | section: "Coding" 6 | description: "Faster, better, stronger" 7 | icon: "dumpster-fire" 8 | --- 9 | 10 | ### Snippets 11 | Learning this can just save time typing and can even be customized to your 12 | liking. These are available in vim, emacs, vscode, and intellij. 13 | 14 | ### lets do an example. 15 | 16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | 29 | ### Do I use snippets? 30 | 31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | 44 | ### It doesn't necessarily save me much time. 45 | 46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | 59 | ### Github Copilot 60 | 61 | ### Let me just show you... 62 | -------------------------------------------------------------------------------- /lessons/terminal-multiplexing-2.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/tmux-2" 3 | title: "Tmux" 4 | order: "32A" 5 | section: "CLI - Beginning" 6 | description: "More manageable terminals" 7 | icon: "dumpster-fire" 8 | --- 9 | 10 | ### First let me give you an example 11 | 12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | 25 | ### LETS TALK TMUX 26 | 27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 | 40 | From [Acrolinux](https://arcolinux.com/everthing-you-need-to-know-about-tmux-servers-and-sessions/) 41 | ![Tmux - Server](./images/tmux-server.png) 42 | 43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | 56 | ### Install tmux 57 | ``` 58 | sudo apt install tmux 59 | ``` 60 | 61 | ``` 62 | brew install tmux 63 | ``` 64 | 65 | ### Benefit of using tmux 66 | 67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 | 80 | ``` 81 | tmux 82 | ``` 83 | 84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 | 97 | ### WHAT DO WE DO NEXT? 98 | 99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 | 112 | ### tmux 113 | `C-d` writes an EOF (end of file) to the stdin, which closes the shell 114 | 115 | #### Understanding note 116 | When you see `C-*` C = ctrl, * = any key. So the previous example is Control + 117 | d. 118 | 119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 | -------------------------------------------------------------------------------- /lessons/terminal-multiplexing-3.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/tmux-3" 3 | title: "Tmux - Using" 4 | order: "33A" 5 | section: "CLI - Beginning" 6 | description: "More manageable terminals" 7 | icon: "dumpster-fire" 8 | --- 9 | ### Warning 10 | Some of my items will be slightly different than yours because I have a tmux rc 11 | that has been refined. You can have one too! I'll even talk about it shortly, 12 | but for the sake on less confusion, lets start with just tmux then we will get 13 | to some of the rc 14 | 15 | #### Why show you the commands 16 | There may come a day when you want to write a little optimized script! 17 | Everything has both the command and a key. The command line interface for tmux 18 | is very complete and you can do a lot of things. 19 | 20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | 33 | ### Lets open a terminal and start tmuxing 34 | 35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | 48 | ``` 49 | tmux list-sessions 50 | 51 | # If you got excited 52 | tmux kill-server 53 | ``` 54 | 55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 | 68 | ``` 69 | tmux 70 | ``` 71 | 72 | ### What actually happens here? (Draw it out) 73 | 74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 | 87 | ### Lets close the terminal 88 | 89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 | 102 | ``` 103 | tmux a 104 | tmux attach 105 | ``` 106 | 107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 | 120 | ### Terminology 121 | Prefix Key 122 | * The key combo you press (default `C-b`). 123 | * Draw it out 124 | 125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 | 138 | ### Creating sessions 139 | 140 | ``` 141 | tmux kill-server 142 | ``` 143 | 144 | ``` 145 | tmux list-sessions 146 | ``` 147 | 148 | ``` 149 | tmux 150 | ``` 151 | 152 | ``` 153 | tmux list-sessions 154 | ``` 155 | 156 | ``` 157 | tmux #errors 158 | tmux new-session #errors 159 | ``` 160 | 161 | ``` 162 | tmux new-session -d 163 | ``` 164 | 165 | ``` 166 | tmux list-sessions 167 | ``` 168 | 169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 | 182 | #### Navigation tip 183 | I don't use this personal, but this is a thing that is good to know. 184 | 185 | * to the next session `-(` 186 | * to the prev session `-)` 187 | 188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 | 201 | ### Close and create new session 202 | ``` 203 | tmux kill-server 204 | tmux new-session # equivalent to tmux 205 | ``` 206 | 207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 | 220 | ### Lets close our tmux (but not really)! 221 | Lets use `-d` 222 | 223 | #### Reattach 224 | 225 | ``` 226 | tmux a #ttach 227 | ``` 228 | 229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 | 242 | ### Navigation tip 243 | You can see all of the sessions and their windows by pressing `-w` 244 | 245 | #### Create a bunch of windows 246 | That way we can really see what happened there. For you to do this on your own 247 | use detach in conjunction with `tmux new-session` command 248 | 249 | #### Fun fact, C-d vs prefix-d 250 | C-d = EOF 251 | prefix-d = tmux detach 252 | 253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 | 266 | ### So those are sessions 267 | it may be hard to see the difference between a session, a window, and a pane. 268 | 269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 | 282 | ### Lets talk about windows 283 | 284 | #### Clean everything up. 285 | ``` 286 | tmux kill-server 287 | ``` 288 | 289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 | 302 | ### Creating Windows 303 | 304 | ``` 305 | tmux 306 | tmux new-window 307 | ``` 308 | 309 | this is equivalent to `-c` 310 | 311 | #### Navigation tip 312 | * `-n` for next window 313 | * `-p` for prev window 314 | * `-#` for the # window 315 | 316 | #### Usefulness tip 317 | A session should contain *like* items. 318 | 319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 | 332 | ![Who does #2 work for?](./images/who-does-2-work-for.jpg) 333 | 334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 | 347 | ### You can name sessions and windows 348 | ``` 349 | tmux new-session -d -s "foofoo" 350 | ``` 351 | ``` 352 | tmux new-window -n "fooooo" 353 | ``` 354 | 355 | #### Usability tip 356 | You cannot have sessions with the same name 357 | 358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 | 371 | ### There are panes 372 | You can definitely look into panes to be able to split your view. I just 373 | haven't really got into that. I find it a pane in the ass.. 374 | 375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 | 388 | From [Acrolinux](https://arcolinux.com/everthing-you-need-to-know-about-tmux-servers-and-sessions/) 389 | ![Tmux - Server](./images/tmux-server.png) 390 | 391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 | 404 | ### Have we solved this? 405 | ![Tooooo many terms](./images/too-many-terms.png) 406 | 407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 | -------------------------------------------------------------------------------- /lessons/terminal-multiplexing-4.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/tmux-4" 3 | title: "Taking TMUX to the next level" 4 | order: "34A" 5 | section: "CLI - Fun" 6 | description: "Tmux + cht.sh" 7 | icon: "dumpster-fire" 8 | --- 9 | 10 | ### Lets create something 11 | #### I AM AN ARTIST, TO GIMP! 12 | 13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | 26 | ### We know some tmux commands. 27 | ``` 28 | tmux new-session -s "foobar" -d 29 | ``` 30 | 31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | 44 | ### BUT DID YOU KNOW?? 45 | ``` 46 | tmux new-session -s "foobar" -d -c "$HOME/personal/developer-productivity" 47 | ``` 48 | ``` 49 | tmux new-window -n "foobar" -c "$HOME/personal" 50 | ``` 51 | ``` 52 | tmux switch-client -t "foobar" 53 | ``` 54 | 55 | ### We can specify a command. 56 | ``` 57 | tmux new-window -n "foobar" [some command goes here] 58 | ``` 59 | 60 | ### Always read the friendly manual (Abbrev'd as RTFM) 61 | ``` 62 | man tmux 63 | ``` 64 | 65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | 78 | ### Quick intro into CLI piping 79 | `prog1 | prog2 | prog3` 80 | 81 | Lets do an example 82 | 83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 | 96 | ### Questions, PLEASE 97 | 98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 | 111 | ### We have one more thing to learn 112 | 113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 | -------------------------------------------------------------------------------- /lessons/terminal-multiplexing-5.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/tmux-5" 3 | title: "Create the TMUX nav script" 4 | order: "36A" 5 | section: "CLI - Fun" 6 | description: "More manageable terminals" 7 | icon: "dumpster-fire" 8 | --- 9 | 10 | ### Lets create the script 11 | 12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | 25 | ### How does this feel? 26 | 27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 | 40 | #### Steaming hot Navigation Tip 41 | `-L` Go to previous session 42 | 43 | #### But how do I make this easy to use? 44 | There are several ways to make this easy to use. 45 | 1. we can use zsh to bindkey 46 | 2. we can use tmux to bindkey 47 | 3. make it available in your path 48 | 4. call out from vim 49 | 50 | We also need to store in a place that we don't lose... where could that be? 51 | 52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 | 65 | 66 | ### TAKE IT TO THE NEXT LEVEL 67 | #### For this we need some precursor knowledge 68 | 69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 | -------------------------------------------------------------------------------- /lessons/terminal-multiplexing-6.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/tmux-6" 3 | title: "The Next TMUX script" 4 | order: "46A" 5 | section: "CLI - Fun" 6 | description: "More manageable terminals" 7 | icon: "dumpster-fire" 8 | --- 9 | 10 | ### So lets build the next item! 11 | Lets talk about it (draw with that artist in you!) 12 | 13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | 26 | ### We have the knowledge this time. Lets build it! 27 | 28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | 41 | ### How I link it up! 42 | ``` 43 | bind-key -r i run-shell "tmux neww tmux-cht.sh" 44 | ``` 45 | 46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | -------------------------------------------------------------------------------- /lessons/terminal-multiplexing-7.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/tmux-7" 3 | title: "Tmux - Plugins & RC" 4 | order: "46A" 5 | section: "CLI - Fun" 6 | description: "More manageable terminals" 7 | icon: "dumpster-fire" 8 | --- 9 | 10 | ### Awesome plugins 11 | [Tmuxinator](https://github.com/tmuxinator/tmuxinator)
12 | Tmux sessionizer! 13 |
14 |
15 | [TmuxP](https://github.com/tmux-python/tmuxp)
16 | Tmux sessionizer! 17 |
18 |
19 | [Tmux Resurrect](https://github.com/tmux-plugins/tmux-resurrect)
20 | Persist Tmux sessions! 21 | 22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | 35 | ### TmuxRC 36 | Location will be `$HOME/.tmux.conf` 37 | 38 | 39 | ``` 40 | unbind C-b 41 | set-option -g prefix C-a 42 | bind-key C-a send-prefix 43 | 44 | bind r source-file ~/.tmux.conf 45 | 46 | set -g base-index 1 47 | 48 | bind -r D neww -c "#{pane_current_path}" "[[ -e TODO.md ]] && nvim TODO.md || nvim ~/dotfiles/todo.md" 49 | ``` 50 | 51 | I had to look this up. I had to look up most things. 52 | 53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 | 66 | -------------------------------------------------------------------------------- /lessons/terminal-multiplexing.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/tmux" 3 | title: "Terminal" 4 | order: "31A" 5 | section: "CLI - Beginning" 6 | description: "More manageable terminals" 7 | icon: "dumpster-fire" 8 | --- 9 | 10 | This is my jam. 11 | 12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | 25 | ### What do I use? 26 | xterm 27 | * meat and poe - tay - toes
28 | 29 | tmux 30 | * This separates the terminal you are using from the underlying session/shell running. 31 | 32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | 45 | ![I would die if I saw this on my system, terminals](./images/too-many-terms.png) 46 | 47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | 60 | ### So lets get started 61 | This is where I think the fun really starts!!! 62 | 63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 | 76 | ### A little story about me 77 | And my love of the terminal.
78 |
79 | 80 | Like any good story... it didn't start that way. 81 | 82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 | 95 | ### I wont be recommending a terminal emulator today 96 | 97 | I use xterm. It was developed in 1984. 98 | 99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 | 112 | ![Alactrity](./images/alactritty.jpeg) 113 | 114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 | 127 | ![Kitty](./images/kitty.jpeg) 128 | 129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 | 142 | ### So what are we going to talk about? 143 | I am going to talk about multiplexing your terminal to cure your terminal 144 | overloading woes. We will eventually build a tool around it and live that 145 | harpoon lifestyle. 146 | 147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 | -------------------------------------------------------------------------------- /lessons/window-manager.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/window-manager" 3 | title: "Window Manager" 4 | order: "15A" 5 | section: "Section 2" 6 | description: "The start of productivity" 7 | icon: "dumpster-fire" 8 | --- 9 | 10 | ### What is a window manager? 11 | 12 | My theory on navigation 13 | 14 | * i3 for ubuntu (very disorienting the first time) 15 | ``` 16 | sudo apt install i3 17 | ``` 18 | 19 | * [Yabai](https://github.com/koekeishiya/yabai) for mac 20 | * [bug.n](https://github.com/fuhsjr00/bug.n) for windows 21 | 22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 | -------------------------------------------------------------------------------- /lessons/zsh.md: -------------------------------------------------------------------------------- 1 | --- 2 | path: "/shell" 3 | title: "Your shell" 4 | order: "30A" 5 | section: "CLI - Beginning" 6 | description: "The shell. The entrypoint." 7 | icon: "dumpster-fire" 8 | --- 9 | 10 | ### A nice terminal experience starts with the shell 11 | We don't need to spend a lot of time here. There are a ton of options, again, 12 | but this time I will make a strong suggestion. 13 | 14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | 27 | ### Strongly suggest zsh 28 | * its default on mac, something at least they have done right 29 | * its easy to install on ubuntu 30 | 31 | ``` 32 | sudo apt install zsh 33 | chsh -s $(which zsh) 34 | ``` 35 | 36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | 49 | ### But what is a shell? 50 | The [Wizard](https://www.youtube.com/user/lastmiles) explained the shell once 51 | to me in the following way. He gets banned from twitch regularly, so..... that 52 | link is to his youtube. 53 | 54 | ``` 55 | # you meant ls -la 56 | ls -;a 57 | ``` 58 | 59 | * Don't forget to draw :) 60 | * Do the `ps -o pid,ppid= -C zsh` example 61 | 62 | ### Terminal vs Shell 63 | 64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 | 77 | ### Shell can be great 78 | A lot of point counter point talk on the internet for bash vs zsh vs tsh vs bsh 79 | vs fish 80 | 81 | * I am just going to give you what I like 82 | 83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 | 96 | ### OhMyZsh 97 | YES I ADMIT IT. 98 | 99 | * How to install 100 | ``` 101 | curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh 102 | ``` 103 | 104 | So what do I get out of oh-my-zsh? 105 | * Open up .zshrc and go to lines plugins 106 | 107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 | 120 | ### Personal Opinion 121 | * Choose something 122 | * Learn about it to some small amount 123 | * Get good at core utils 124 | * Take advantage of already built tools that are amazing. 125 | 126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 | 139 | ### Apply what you have learned 140 | Lets say you decide, yes I want zsh and oh my zsh. What should you do? 141 | 142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 | 155 | PUT IT IN YOUR ANSIBLE 156 | 157 | #### Fun side note 158 | I actually forgot to do it for myself and so when I originally executed this I 159 | didn't have zsh-autosuggestions installed. Took a moment to figure it out. 160 | 161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "developer-productivity", 3 | "description": "education site", 4 | "version": "1.0.0", 5 | "author": "Brian Holt ", 6 | "dependencies": { 7 | "@fontsource/open-sans": "^4.5.3", 8 | "@fortawesome/fontawesome-free": "^5.15.4", 9 | "bootstrap": "^5.1.3", 10 | "front-matter": "^4.0.2", 11 | "gatsby": "^4.6.2", 12 | "gatsby-cli": "^4.6.1", 13 | "gatsby-link": "^4.6.0", 14 | "gatsby-plugin-layout": "^3.6.0", 15 | "gatsby-plugin-react-helmet": "^5.6.0", 16 | "gatsby-plugin-react-svg": "^3.1.0", 17 | "gatsby-plugin-sharp": "^4.6.0", 18 | "gatsby-remark-autolink-headers": "^5.6.0", 19 | "gatsby-remark-copy-linked-files": "^5.6.0", 20 | "gatsby-remark-images": "^6.6.0", 21 | "gatsby-remark-prismjs": "^6.6.0", 22 | "gatsby-source-filesystem": "^4.6.0", 23 | "gatsby-transformer-remark": "^5.6.0", 24 | "is-url-superb": "^6.1.0", 25 | "parse-markdown-links": "^1.0.4", 26 | "prismjs": "^1.26.0", 27 | "react": "^17.0.2", 28 | "react-dom": "^17.0.2", 29 | "react-helmet": "^6.1.0" 30 | }, 31 | "keywords": [ 32 | "gatsby", 33 | "gatsby-starter", 34 | "course", 35 | "education" 36 | ], 37 | "license": "(CC-BY-NC-4.0 OR Apache-2.0)", 38 | "main": "n/a", 39 | "scripts": { 40 | "build": "gatsby build --prefix-paths", 41 | "csv": "node csv.js", 42 | "dev": "gatsby develop", 43 | "format": "prettier --write \"src/**/*.{js,jsx,md,css}\"", 44 | "lint": "eslint \"src/**/*.{js,jsx}\"" 45 | }, 46 | "devDependencies": { 47 | "@babel/polyfill": "^7.12.1", 48 | "babel-eslint": "^10.1.0", 49 | "core-js": "^3.21.0", 50 | "eslint": "^8.8.0", 51 | "eslint-config-prettier": "^8.3.0", 52 | "eslint-plugin-import": "^2.25.4", 53 | "eslint-plugin-jsx-a11y": "^6.5.1", 54 | "eslint-plugin-react": "^7.28.0", 55 | "prettier": "^2.5.1" 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/components/TOCCard.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Link from "gatsby-link"; 3 | import Bg from "../layouts/corner-image.svg"; 4 | import * as helpers from "../util/helpers"; 5 | 6 | const sortFn = helpers.sorter; 7 | 8 | const LessonCard = ({ content, title }) => { 9 | console.log(sortFn); 10 | 11 | const sections = content 12 | .map((lesson) => lesson.node.frontmatter) 13 | .sort(sortFn) 14 | .reduce((acc, lesson) => { 15 | if (!acc.length) { 16 | acc.push([lesson]); 17 | return acc; 18 | } 19 | 20 | const lastSection = acc[acc.length - 1][0].section.split(",")[0]; 21 | if (lastSection === lesson.section.split(",")[0]) { 22 | acc[acc.length - 1].push(lesson); 23 | } else { 24 | acc.push([lesson]); 25 | } 26 | 27 | return acc; 28 | }, []); 29 | 30 | return ( 31 |
32 |

{title}

33 |
34 |
    35 | {sections.map((section) => ( 36 |
  1. 37 |
    38 |
    39 | 44 |
    45 |
    46 |

    {section[0].section}

    47 |
      48 | {section.map((lesson) => ( 49 |
    1. 50 | {lesson.title} 51 |
    2. 52 | ))} 53 |
    54 |
    55 |
    56 | 57 |
    58 |
    59 |
  2. 60 | ))} 61 |
62 |
63 |
64 | ); 65 | }; 66 | 67 | export default LessonCard; 68 | -------------------------------------------------------------------------------- /src/layouts/Footer.css: -------------------------------------------------------------------------------- 1 | .footer { 2 | width: 100%; 3 | padding: 50px 15px; 4 | background-color: var(--primary); 5 | display: flex; 6 | align-items: center; 7 | justify-content: center; 8 | color: var(--text-footer); 9 | } 10 | 11 | .socials { 12 | display: flex; 13 | align-items: center; 14 | max-width: 900px; 15 | width: 100%; 16 | margin: 0; 17 | padding: 0; 18 | } 19 | 20 | .social { 21 | display: inline-block; 22 | list-style: none; 23 | margin-right: 40px; 24 | } 25 | 26 | .social img:hover { 27 | opacity: 0.4; 28 | } 29 | 30 | .social img { 31 | transition: opacity 0.25s; 32 | width: 30px; 33 | } 34 | 35 | .terms { 36 | font-size: 10px; 37 | } 38 | 39 | .terms p { 40 | margin: 3px; 41 | } 42 | 43 | .footer a { 44 | color: inherit; 45 | text-decoration: underline; 46 | } 47 | 48 | .social svg { 49 | transition: opacity 0.25s; 50 | } 51 | 52 | .social svg:hover { 53 | opacity: 0.4; 54 | } 55 | -------------------------------------------------------------------------------- /src/layouts/Footer.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { graphql, StaticQuery } from "gatsby"; 3 | import Gh from "./github-social.svg"; 4 | import Tw from "./twitter-social.svg"; 5 | import Li from "./linkedin-social.svg"; 6 | 7 | import "./Footer.css"; 8 | 9 | export default function Footer({ twitter, linkedin, github }) { 10 | return ( 11 |
12 |
    13 | {twitter ? ( 14 |
  • 15 | 16 | 17 | 18 |
  • 19 | ) : null} 20 | {github ? ( 21 |
  • 22 | 23 | 24 | 25 |
  • 26 | ) : null} 27 | {linkedin ? ( 28 |
  • 29 | 30 |
  • 31 | 32 |
  • 33 | ) : null} 34 |
  • 35 |
    36 |

    Content Licensed Under CC-BY-NC-4.0

    37 |

    Code Samples and Excercise Licensed Under Apache 2.0

    38 |

    39 | Site Designed by{" "} 40 | Alex Danielson 41 |

    42 |
    43 |
  • 44 |
45 |
46 | ); 47 | } 48 | -------------------------------------------------------------------------------- /src/layouts/corner-image.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/layouts/github-social.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/layouts/index.css: -------------------------------------------------------------------------------- 1 | @import url(./variables.css); 2 | 3 | body { 4 | font-family: "Open Sans"; 5 | background: linear-gradient(90deg, var(--bg-main) 15px, transparent 1%) center, 6 | linear-gradient(var(--bg-main) 15px, transparent 1%) center, var(--bg-dots); 7 | background-size: 16px 16px; 8 | } 9 | 10 | a { 11 | color: var(--text-links); 12 | } 13 | 14 | .navbar { 15 | border-bottom: 1px solid #ccc; 16 | position: fixed; 17 | width: 100%; 18 | top: 0; 19 | z-index: 10; 20 | display: flex; 21 | justify-content: space-between; 22 | align-items: center; 23 | background-color: var(--bg-main); 24 | padding: 10px; 25 | } 26 | 27 | .navbar h1 { 28 | font-size: 20px; 29 | margin: inherit; 30 | padding: inherit; 31 | font-weight: bold; 32 | color: var(--text-main); 33 | } 34 | 35 | .navbar h2, 36 | .navbar h3 { 37 | font-size: 14px; 38 | margin: inherit; 39 | padding: inherit; 40 | text-transform: uppercase; 41 | } 42 | 43 | .button { 44 | border-radius: 10px; 45 | background: var(--nav-buttons); 46 | color: var(--nav-buttons-text); 47 | padding: 15px 20px; 48 | display: flex; 49 | justify-content: center; 50 | align-items: center; 51 | text-decoration: none; 52 | } 53 | 54 | .button a { 55 | color: white; 56 | text-decoration: none; 57 | } 58 | 59 | .button a:hover { 60 | text-decoration: underline; 61 | } 62 | 63 | .jumbotron { 64 | padding: 0; 65 | } 66 | 67 | .jumbotron .courseInfo, 68 | .jumbotron .courseIcon { 69 | padding: 20px; 70 | } 71 | 72 | .jumbotron .courseInfo, 73 | .jumbotron .courseIcon { 74 | text-align: center; 75 | } 76 | 77 | .author { 78 | margin-top: 40px; 79 | display: flex; 80 | justify-content: center; 81 | } 82 | 83 | @media (min-width: 1000px) { 84 | .jumbotron { 85 | display: flex; 86 | width: 100%; 87 | min-height: 45vh; 88 | } 89 | .jumbotron .courseInfo, 90 | .jumbotron .courseIcon { 91 | display: flex; 92 | justify-content: center; 93 | align-items: center; 94 | } 95 | .jumbotron .courseInfo { 96 | width: 65%; 97 | text-align: right; 98 | } 99 | .jumbotron .courseIcon { 100 | width: 35%; 101 | display: flex; 102 | align-items: center; 103 | justify-content: center; 104 | } 105 | 106 | .author { 107 | justify-content: flex-end; 108 | } 109 | .jumbotron .courseInfo-inner { 110 | max-width: 85%; 111 | } 112 | } 113 | 114 | .jumbotron h1, 115 | .jumbotron h2 { 116 | color: var(--text-main-headers); 117 | } 118 | 119 | .jumbotron h1 { 120 | font-size: 50px; 121 | margin-bottom: 20px; 122 | } 123 | 124 | .jumbotron .courseInfo { 125 | background: var(--primary); 126 | } 127 | 128 | .jumbotron .courseIcon { 129 | background: var(--secondary); 130 | } 131 | 132 | .jumbotron .courseIcon img { 133 | max-width: 180px; 134 | } 135 | 136 | .author .info { 137 | padding: 10px; 138 | } 139 | 140 | .author .name { 141 | font-size: 18px; 142 | font-weight: bold; 143 | color: var(--text-main-headers); 144 | } 145 | 146 | .author .company { 147 | color: var(--text-main-headers); 148 | font-size: 16px; 149 | } 150 | 151 | .author .image { 152 | border-radius: 75px; 153 | overflow: hidden; 154 | height: 75px; 155 | width: 75px; 156 | } 157 | 158 | .navbar-brand.navbar-brand { 159 | text-transform: uppercase; 160 | font-weight: bold; 161 | color: var(--text-main-headers); 162 | } 163 | 164 | .lesson-section-title { 165 | color: var(--text-main-headers); 166 | } 167 | 168 | .lesson-container { 169 | position: relative; 170 | max-width: 900px; 171 | margin: 0 auto 45px auto; 172 | padding: 10px 40px; 173 | box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2); 174 | background-color: var(--bg-lesson); 175 | border-radius: 5px; 176 | margin-top: 40px; 177 | } 178 | 179 | .lesson { 180 | margin: 15px; 181 | padding: 15px; 182 | border-radius: 8px; 183 | } 184 | 185 | .lesson > h1 { 186 | color: var(--text-header); 187 | font-size: 24px; 188 | } 189 | 190 | .lesson h2 { 191 | font-size: 24px; 192 | margin-top: 20px; 193 | margin-bottom: 10px; 194 | } 195 | 196 | .lesson h2::after { 197 | content: ""; 198 | display: block; 199 | height: 3px; 200 | margin-top: 5px; 201 | background: var(--text-header); 202 | max-width: 300px; 203 | } 204 | 205 | .lesson p { 206 | clear: both; 207 | } 208 | 209 | .lesson p, 210 | .lesson li { 211 | line-height: 180%; 212 | } 213 | 214 | .lesson-links { 215 | font-size: 18px; 216 | padding: 15px 0; 217 | } 218 | 219 | .next { 220 | float: right; 221 | } 222 | 223 | .prev { 224 | float: left; 225 | } 226 | 227 | .lesson-title { 228 | text-transform: uppercase; 229 | font-weight: bold; 230 | } 231 | 232 | .gatsby-highlight { 233 | padding: 4px; 234 | border-radius: 4px; 235 | display: flex; 236 | justify-content: space-between; 237 | flex-direction: column; 238 | align-items: stretch; 239 | } 240 | 241 | .lesson-content td { 242 | border: 1px solid black; 243 | padding: 8px; 244 | } 245 | 246 | .lesson-content td input { 247 | min-width: 300px; 248 | } 249 | 250 | .lesson-flex { 251 | display: flex; 252 | flex-direction: column; 253 | justify-content: center; 254 | align-items: center; 255 | } 256 | 257 | .random-tweet { 258 | width: 100%; 259 | margin-top: 100px; 260 | } 261 | 262 | .fem-link { 263 | text-align: center; 264 | } 265 | 266 | .content-container { 267 | display: flex; 268 | flex-direction: column; 269 | justify-content: space-between; 270 | min-height: 100vh; 271 | padding-top: 50px; 272 | } 273 | 274 | blockquote { 275 | padding: 15px; 276 | background-color: var(--emphasized-bg); 277 | border: 2px solid var(--emphasized-border); 278 | border-radius: 5px; 279 | } 280 | 281 | blockquote > *:last-child { 282 | margin-bottom: 0; 283 | } 284 | 285 | .lesson-content img { 286 | max-width: 100%; 287 | } 288 | 289 | .main-card { 290 | max-width: 900px; 291 | margin: 0 auto; 292 | overflow: hidden; 293 | } 294 | 295 | .lesson-title { 296 | font-size: 20px; 297 | padding: 15px 30px; 298 | } 299 | 300 | .lesson-content { 301 | line-height: 1.5; 302 | } 303 | 304 | .lesson-text { 305 | width: 100%; 306 | padding: 25px 5px 25px 35px; 307 | min-height: 200px; 308 | } 309 | 310 | .sections-name { 311 | margin: 0; 312 | padding: 0; 313 | } 314 | 315 | ol.sections-name { 316 | counter-reset: my-awesome-counter; 317 | list-style: none; 318 | padding-left: 40px; 319 | width: 98%; 320 | margin: 0; 321 | padding: 0; 322 | } 323 | 324 | ol.sections-name > li { 325 | counter-increment: my-awesome-counter; 326 | display: flex; 327 | flex-direction: row; 328 | flex-wrap: wrap; 329 | margin-bottom: 35px; 330 | width: 100%; 331 | box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2); 332 | border-bottom-right-radius: 5px; 333 | border-top-right-radius: 5px; 334 | } 335 | ol.sections-name .lesson-preface { 336 | /* content: counter(my-awesome-counter); */ 337 | color: var(--icons); 338 | display: flex; 339 | position: relative; 340 | align-items: center; 341 | justify-content: center; 342 | background: var(--bg-lesson-preface); 343 | font-size: 30px; 344 | padding: 25px; 345 | width: 30%; 346 | } 347 | 348 | .lesson-preface .fas { 349 | font-size: 60px; 350 | } 351 | 352 | ol.sections-name .lesson-preface::before { 353 | content: counter(my-awesome-counter); 354 | position: absolute; 355 | top: 0; 356 | left: 5px; 357 | font-size: 20px; 358 | font-weight: bold; 359 | color: var(--icons); 360 | } 361 | 362 | ol.sections-name .lesson-details { 363 | display: flex; 364 | flex-basis: 100%; 365 | flex: 1; 366 | background: var(--bg-lesson); 367 | min-width: 600px; 368 | position: relative; 369 | } 370 | 371 | .details-bg { 372 | --corner-fill: var(--corner-inactive); 373 | transition: fill 0.25s; 374 | width: 10%; 375 | height: 0; 376 | padding-bottom: 10%; 377 | background-size: cover; 378 | background-repeat: no-repeat; 379 | position: absolute; 380 | top: 0; 381 | right: 0; 382 | } 383 | 384 | .details-bg > svg { 385 | width: 100%; 386 | height: auto; 387 | } 388 | 389 | .details-bg > svg path { 390 | transition: fill 0.25s; 391 | } 392 | 393 | .lesson-details:hover .details-bg, 394 | .lesson-container .details-bg { 395 | --corner-fill: var(--corner-active); 396 | } 397 | 398 | @media (min-width: 1000px) { 399 | ol.sections-name > li::before { 400 | border-bottom-left-radius: 5px; 401 | border-top-left-radius: 5px; 402 | } 403 | ol.sections-name .lesson-details { 404 | border-bottom-right-radius: 5px; 405 | border-top-right-radius: 5px; 406 | } 407 | } 408 | 409 | .lesson-details h3 { 410 | font-size: 22px; 411 | border-bottom: 1px solid var(--less); 412 | padding-bottom: 10px; 413 | display: inline-block; 414 | font-weight: bold; 415 | margin-bottom: 20px; 416 | } 417 | 418 | .lesson-links { 419 | margin-top: 45px; 420 | margin-bottom: 80px; 421 | } 422 | 423 | .lesson-links a { 424 | border-radius: 10px; 425 | background: var(--nav-buttons); 426 | color: var(--nav-buttons-text); 427 | padding: 15px 20px; 428 | display: flex; 429 | justify-content: center; 430 | align-items: center; 431 | text-decoration: none; 432 | } 433 | 434 | .lesson-links a.prev { 435 | padding-left: 10px; 436 | } 437 | 438 | .lesson-links a.next { 439 | padding-right: 10px; 440 | } 441 | 442 | .lesson-links a:hover { 443 | text-decoration: none; 444 | } 445 | 446 | .lesson-links .arrow { 447 | font-size: 24px; 448 | line-height: 24px; 449 | padding: 0px 5px; 450 | } -------------------------------------------------------------------------------- /src/layouts/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Link from "gatsby-link"; 3 | import Helmet from "react-helmet"; 4 | import { graphql, StaticQuery } from "gatsby"; 5 | 6 | import "@fontsource/open-sans"; 7 | import "bootstrap/dist/css/bootstrap.css"; 8 | import "@fortawesome/fontawesome-free/css/all.css"; 9 | import "./index.css"; 10 | 11 | import Footer from "./Footer"; 12 | // import jpg from "../../static/posterframe.jpg"; 13 | 14 | const TemplateWrapper = (props) => { 15 | return ( 16 | { 18 | const frontmatter = 19 | props.data && props.data.markdownRemark 20 | ? props.data.markdownRemark.frontmatter 21 | : null; 22 | 23 | return ( 24 |
25 | 71 |
72 | 73 |

{data.site.siteMetadata.title}

74 | 75 | {!frontmatter ? null : ( 76 |

{`${frontmatter.section} – ${frontmatter.title}`}

77 | )} 78 |

Developer Productivity Course Videos ▶️ 

79 |
80 |
81 |
{props.children}
82 |
87 |
88 |
89 | ); 90 | }} 91 | query={graphql` 92 | query HomePage($path: String!) { 93 | markdownRemark(frontmatter: { path: { eq: $path } }) { 94 | html 95 | frontmatter { 96 | path 97 | title 98 | order 99 | section 100 | description 101 | } 102 | } 103 | site { 104 | pathPrefix 105 | siteMetadata { 106 | title 107 | subtitle 108 | description 109 | keywords 110 | twitter 111 | linkedin 112 | github 113 | } 114 | } 115 | } 116 | `} 117 | /> 118 | ); 119 | }; 120 | 121 | export default TemplateWrapper; 122 | -------------------------------------------------------------------------------- /src/layouts/linkedin-social.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/layouts/twitter-social.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/layouts/variables.css: -------------------------------------------------------------------------------- 1 | /* 2 | change your syntax highlighting theme here 3 | https://github.com/PrismJS/prism/tree/master/themes 4 | */ 5 | @import "prismjs/themes/prism-solarizedlight.css"; 6 | 7 | :root { 8 | --primary: #dfa067; 9 | --secondary: #93aca7; 10 | --highlight: #224159; 11 | 12 | --text-header: var(--primary); 13 | --text-main-headers: var(--highlight); 14 | --text-links: #007bff; 15 | --text-footer: #333; 16 | 17 | --bg-main: white; 18 | --bg-dots: var(--highlight); 19 | --bg-lesson: white; 20 | 21 | --nav-buttons: var(--highlight); 22 | --nav-buttons-text: white; 23 | 24 | --corner-active: var(--highlight); 25 | --corner-inactive: #f4f4f4; 26 | --icons: var(--highlight); 27 | 28 | --emphasized-bg: #dce8ff; 29 | --emphasized-border: #aab6d2; 30 | } 31 | -------------------------------------------------------------------------------- /src/pages/404.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | const NotFoundPage = () => ( 4 |
5 |

NOT FOUND

6 |

You just hit a route that doesn't exist... the sadness.

7 |
8 | ); 9 | 10 | export default NotFoundPage; 11 | -------------------------------------------------------------------------------- /src/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { StaticQuery, graphql } from "gatsby"; 3 | import Card from "../components/TOCCard"; 4 | 5 | const IndexPage = () => ( 6 | ( 39 |
40 |
41 |
42 |
43 |

{props.site.siteMetadata.title}

44 |

{props.site.siteMetadata.subtitle}

45 |
46 |
47 | 51 |
52 |
53 |
{props.site.siteMetadata.author}
54 |
55 | {props.site.siteMetadata.authorSubtitle} 56 |
57 |
58 |
59 |
60 |
61 |
62 | 63 |
64 |
65 | 66 | 70 |
71 | )} 72 | /> 73 | ); 74 | 75 | export default IndexPage; 76 | -------------------------------------------------------------------------------- /src/templates/lessonTemplate.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Link from "gatsby-link"; 3 | import { graphql } from "gatsby"; 4 | import * as helpers from "../util/helpers"; 5 | import Bg from "../layouts/corner-image.svg"; 6 | 7 | const sortFn = helpers.sorter; 8 | 9 | export default function Template(props) { 10 | let { markdownRemark, allMarkdownRemark } = props.data; // data.markdownRemark holds our post data 11 | 12 | const sections = allMarkdownRemark.edges 13 | .map((lesson) => lesson.node.frontmatter) 14 | .sort(sortFn); 15 | 16 | const { frontmatter, html } = markdownRemark; 17 | 18 | const index = sections.findIndex((el) => el.path === frontmatter.path); 19 | 20 | const prevLink = 21 | index > 0 ? ( 22 | 23 | 24 | {" " + sections[index - 1].title} 25 | 26 | ) : null; 27 | const nextLink = 28 | index < sections.length - 1 ? ( 29 | 30 | {sections[index + 1].title + " "} 31 | 32 | 33 | ) : null; 34 | return ( 35 |
36 |
37 |

{frontmatter.title}

38 |

{frontmatter.date}

39 |
43 |
44 | {prevLink} 45 | {nextLink} 46 |
47 |
48 |
49 | 50 |
51 |
52 | ); 53 | } 54 | 55 | export const pageQuery = graphql` 56 | query LessonByPath($path: String!) { 57 | markdownRemark(frontmatter: { path: { eq: $path } }) { 58 | html 59 | frontmatter { 60 | path 61 | title 62 | order 63 | section 64 | } 65 | } 66 | allMarkdownRemark(limit: 1000) { 67 | edges { 68 | node { 69 | frontmatter { 70 | order 71 | path 72 | title 73 | } 74 | } 75 | } 76 | } 77 | } 78 | `; 79 | -------------------------------------------------------------------------------- /src/util/helpers.js: -------------------------------------------------------------------------------- 1 | function splitSections(str) { 2 | const validSectionTest = /^\d+[A-Z]+$/; 3 | const numbersRegex = /^\d+/; 4 | const lettersRegex = /[A-Z]+$/; 5 | if (!validSectionTest.test(str)) { 6 | throw new Error( 7 | `${str} does not match the section format. It must be , like 16A or 5F (case sensitive)` 8 | ); 9 | } 10 | 11 | return [numbersRegex.exec(str)[0], lettersRegex.exec(str)[0]]; 12 | } 13 | 14 | const getCharScore = str => 15 | str 16 | .split("") 17 | .map((char, index) => char.charCodeAt(0) * 10 ** index) 18 | .reduce((acc, score) => acc + score); 19 | 20 | function sorter(a, b) { 21 | let aOrder, bOrder; 22 | 23 | if (a.attributes && a.attributes.order) { 24 | aOrder = a.attributes.order; 25 | bOrder = b.attributes.order; 26 | } else { 27 | aOrder = a.order; 28 | bOrder = b.order; 29 | } 30 | 31 | const [aSec, aSub] = splitSections(aOrder); 32 | const [bSec, bSub] = splitSections(bOrder); 33 | 34 | // sections first 35 | if (aSec !== bSec) { 36 | return aSec - bSec; 37 | } 38 | 39 | // subsections next 40 | return getCharScore(aSub) - getCharScore(bSub); 41 | } 42 | 43 | module.exports.splitSections = splitSections; 44 | module.exports.sorter = sorter; 45 | -------------------------------------------------------------------------------- /static/author.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/static/author.jpg -------------------------------------------------------------------------------- /static/author.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/static/author.png -------------------------------------------------------------------------------- /static/corner-image-active.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /static/corner-image-inactive.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /static/courseImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/static/courseImage.png -------------------------------------------------------------------------------- /static/posterframe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/static/posterframe.jpg -------------------------------------------------------------------------------- /static/thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/static/thumb.jpg -------------------------------------------------------------------------------- /static/thumb.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThePrimeagen/dev-productivity/48c02352d66d2a21460ffe4ceb519c61872dc052/static/thumb.webp --------------------------------------------------------------------------------