You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
corinne
corinneling
programming padawan interested in everything
(they/them)
Dotfiles: Understand their purpose and how to set them up
One thing I had trouble grasping at first were dotfiles, and I know that is pretty basic, but all the articles I read skipped the initial, what and went into customization details.
So, I am documenting the basics of what dotfiles are, how to see them, access them, set them up etc.
Taking the config.yml file Circle Ci gave me for node, with correct settings for Code Climate 2.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I started hosting this beginner's guide site with a github pages branch because I am using handlebar templates to build out the pages. That way I can have a clean build for the project. My goals for hosting the beginners guide were to have all of the built HTML files in the root of the project, and to have a clean build where I could clean out the static folder before building the static assets into it each time. This is how I set that up with a GitHub Pages branch:
From the master branch create a gh-pages branch
git checkout -b gh-pages
Push up the branch
git push -u origin gh-pages
Run your build tasks. Mine is npm start. It runs a few npm scripts from the package.json, and compiles the static assets in a folder called dist
npm i --save-dev style-loader css-loader
we have to use both of these loaders because the css-loader lets webpack parse the css and the style loader adds a <style> tag to the head of the html file so the css can be added to it
Add the style-loader and css-loader to the webpack rules array (we dont need to import it into the file)
I this is part of the first node web scraper I created with axios and cheerio.
I took out all of the logic, since I only wanted to showcase how a basic setup for a nodejs web scraper would look.
One problem I had while practicing git was syncing up a forked repository. This can come in handy for open source projects and collaborating in teams without permissions to directly push onto an original repo. I'm interested in open source, so I figured it would be a good thing to learn, and a good thing to document (because I am sure the details will skip my mind later).
Make sure you are in the right place
That was my first mistake. I was in the wrong directory so I got this error when I tried to merge.
fatal: refusing to merge unrelated histories
That happened because I was telling git to merge one repo (my dotfiles repo) with the other (my apprenticeship repo). Here's some documentation on that error
An easy way to check where you are is the command: