Skip to content

Instantly share code, notes, and snippets.

View gingkapls's full-sized avatar

gingkapls

  • 09:43 (UTC +05:30)
View GitHub Profile
@Eisenwave
Eisenwave / spaces_are_better_than_tabs.md
Last active April 9, 2025 22:40
Why spaces are better than tabs

Why spaces are better than tabs

One of the longest unresolved arguments among developers is whether you should use tabs or spaces in your code. It is also difficult to find good discussion on the topic because it gets sidetracked by non-issues. This post makes two assumptions, so we can focus on what matters:

  • You use a code editor which assists in indenting. Whether the file contains tabs or spaces, you just press Tab once to indent.
  • The project is set up (e.g. through GitHub actions) to reject malformatted files,
@cvan
cvan / google_fonts.md
Created March 12, 2016 00:12
get ttf, woff, woff2 from Google Fonts

ttf

curl 'https://fonts.googleapis.com/css?family=Karla'

woff2

curl 'https://fonts.googleapis.com/css?family=Karla' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'User-Agent: AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116'

woff

@cobyism
cobyism / gh-pages-deploy.md
Last active April 12, 2025 09:10
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).