Git Product home page Git Product logo

devsnippets's Introduction

Hey 👋, welcome to Dev Snippets!

Dev Snippets is (or intends to be) a collection of useful code snippets for new developers.

Initially this started as a little personal project, just somewhere for me to save those little snippets of code, that I need every so often but that I can never remember.

Unfortunately, like most side projects, I've not really had time to get it going. However, with Hacktoberfest looming, I thought why not resurrect it, opening it up for others to contribute to, helping people make their first open source contribution's, whilst building an awesome set of snippets for us all to use!

Contributing

There are no hard and fast rules here, so please feel free to contribute by opening a pull request adding your snippet. This isn't a new idea so check out projects like DevHints for inspiration.

...And if you're still not sure, or you need some help, just open an issue or drop me a message @rick_west8 and I'll do my best to guide you through it!

  • Fork it (https://github.com/yourname/yourproject/fork)
  • Create your feature branch (git checkout -b feature/fooBar)
  • Commit your changes (git commit -am 'Add some fooBar')
  • Push to the branch (git push origin feature/fooBar)
  • Create a new Pull Request

Installation

Don't be intimidated, if you're just adding a simple snippet to a markdown file, you probably don't even need to get Dev Snippets up and running locally. You can just make your changes to the correct file and open a pull request.

However, if you want to make a large contribution or are confident enough to get stuck in, follow the instructions 👇 .

System Requirements

Dev Snippets is built with Jigsaw, so you need to have PHP 7 and Composer installed on your machine. You'll also need Node.js, NPM and Yarn installed in order to use Laravel Mix to compile the CSS and Javascript.

Getting Started

  1. Clone the repo

    git clone https://github.com/rickwest/devsnippets.git devsnippets
  2. Install dependencies

     cd devsnippets
     composer install
     yarn install

Now that you have everything installed, you can serve the site using PHP ./vendor/bin/jigsaw serve or alternatively, using Browsersync yarn run watch

Navigate to http://localhost:3000/snippets/welcome/ and you should now see the website!

For more help getting started, be sure to check out the official documentation. It really is good!


Adding a Snippet

Adding a snippet is simply a case of locating the correct markdown file and making the desired changes.

All snippets are located in the source/snippets/ directory.

If you are creating a new snippet page, the top of each snippet page contains a YAML header that specifies how it should be rendered. The title attribute is used to dynamically generate HTML title and OpenGraph tags for each page. The extends attribute defines which parent Blade layout this content file will render with (e.g. _layouts.documentation will render with source/_layouts/documentation.blade.php), and the section attribute defines the Blade "section" that expects this content to be placed into it.

extends: _layouts.documentation
section: content
title: My Awesome Snippet
description: An interesting Dev Snippet and also my first Open Source contribution!

Your snippet content

You will also need to add your new page to the navigation array specified in navigation.php and don't forget to add your name to CONTRIBUTORS.md.


Copyright and License

This project is licensed under the MIT License.

devsnippets's People

Contributors

akshaythakare7 avatar augustoscher avatar cemuka avatar codacy20 avatar comealongerica avatar crammers avatar cristuker avatar dependabot[bot] avatar guptabhaskar avatar hjn66 avatar hwilson2563 avatar janelbrandon avatar jesusmava avatar jsun1590 avatar kenanchristian avatar leslie-alldridge avatar midhun-mathew avatar ntjnh avatar paskalouis avatar pixelart7 avatar rickwest avatar sabihashaik avatar sahishnu avatar salmccarty avatar shah78677 avatar spaceshipdev avatar subbuswaroop avatar tarkhandelwal avatar viktor89 avatar wahaj26 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

devsnippets's Issues

Make js snippets more consistent and fix typos/grammatical issues

Hi Rick - I just want to offer to introduce some consistency in the javascript snippets md, if that's something you would want done. I don't want to step on toes :)

If there's a style guide you'd like followed, let me know, or an example you'd like to use as a guide.

404 returned on https://devsnippets.xyz/snippets/welcome

Hi Rick, I thought I'd check out the devsnippets site, looks like the to the snippets button sends us to a 404. Had a look around the source but not too familiar with how the pages are built. I take it might be related to the name change of getting started to welcome?

Add more snippets!

We need more snippets adding! This is a great way to get started contributing to Hacktoberfest and Open Source in general.

There are no hard and fast rules here, so please feel free to contribute by opening a pull request adding your snippet.

If you aren't sure what might be suitable, check out projects like DevHints for inspiration.

Instructions for adding a snippet can be found here ...and if you're still not sure, or you need some help, just open an issue or drop me a message @rick_west8 and I'll do my best to guide you through it!

Merge outstanding PR's from Hacktoberfest last year

I'd love some help with with getting the outstanding PR's from Hacktoberfest last year merged and just generally tidying this project up! If anyone wants to help, let me know and I'll do my best to facilitate it! 😃

Add Functions section to Javascript snippets page?

The Javascript snippets page currently have separate sections for subjects which fall under a same category: Functions. The subjects are [Useful Functions] and [Closures] - those could be subsections of [Functions] instead. If we were to add more info about functions in general (as I'd like to do), this could help keep things organized.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.