diff --git a/README.md b/README.md index 286231b..12d0e19 100644 --- a/README.md +++ b/README.md @@ -25,3 +25,18 @@ git clone https://github.com/BytesClub/BytesClub.github.io.git 2. Install dependencies: `$ bundle install` 3. Run the server: `$ bundle exec jekyll serve` 4. From your browser, go to: `http://localhost:4000/` + + +### Add a project + +##### JSON Data + +Added in an extremely stupid way, improve it if anyone is interested + +1. Get the data from + +``` +https://api.github.com/repos/BytesClub//contributors +``` +2. Store it in _data/ +3. Provide the name in the `.md` file in `_assets` \ No newline at end of file diff --git a/TLoC.md b/TLoC.md new file mode 100644 index 0000000..7b869ce --- /dev/null +++ b/TLoC.md @@ -0,0 +1,128 @@ +--- +layout: page +title: Thousand Lines of Code +--- + +![logo](https://raw.githubusercontent.com/BytesClub/BytesClub.github.io/master/images/tloc.png) + +Thousand Lines of Code (TLoC) is a open source program initiated by Bytes Club to bring more students into open source development. Students will have to work under their mentors on one or more project for a span of 3 months during their semester breaks + +### Timeline + +* **17-June-2017:** Program Launched and Idea Accepting Starts +* **14-July-2017:** Idea Accepting Ends +* **15-July-2017:** Peer Bonding and Project Analysis +* **1st-August-2017:** Actual Coding Program Starts +* **30-September-2017:** Program Ends and Result Declaration + +### Available Projects + +--- + +#### [Chalk](https://github.com/BytesClub/chalk) +A command line text editor written in C + +**Brief Explanation**: Currently chalk is in a very early stage of development. The idea of this project is to complete the basic version 1.0 of chalk along with it's documentation:
+* Accepting input from the user and producing the output +* Ability to view and edit the contents of a file effectively +* Searching +* Syntax highlighting +* Documentation of the overall project, using [Sphinx](http://www.sphinx-doc.org/en/stable/)
+ +**Technologies**: C, CLI
+**Maintainer**: [Rudra Nil Basu](https://github.com/RudraNilBasu)
+**Communication**: [BytesClub/General](https://gitter.im/Bytes_Club/General) on Gitter + +--- + +#### [MAKAUT Connect](https://github.com/BytesClub/MAKAUT-Connect) +A web application for MAKAUT students to get notified about lectures, events and exams. + +**Brief Explanation**: The project MAKAUT Connect currently has just a sample HTML page, with header ang logo. The project is Component driven based on Virtual DOM concept of [React](https://facebook.github.io/react/). We will be using [Express](https://expressjs.com/) for our back-end. Key features of this projects:
+* Whole project is in NodeJS running in Chrome V8 engine. +* Codebase will be wriiten in ES6 Standard following our [Coding Style](/docs/coding_style.pdf). +* We will be using Redux for Web API request handling and React-Router for routing purpose. +* For REST API service we will be using Express as framework MongoDB/MySQL as database.
+ +**Technologies**: NodeJS, React-Redux-Webpack, RESTful API
+**Maintainer**: [Progyan Bhattacharya](https://github.com/Progyan1997) + +--- + +#### [ServerX](https://github.com/BytesClub/serverX) +A HTTP/HTTPS Web Server Handler by (C) Bytes Club + +**Brief Explanation**: The codebase of serverX is a clone of [CS50 Problem Set 5](http://cdn.cs50.net/2016/x/psets/6/pset6/pset6.html) with additional cross-platform dependency resolution. This project works in both Linux and Windows architecture. Key things about this projetc:
+* The code is completely written in C with few or more library dependencies. +* We are using web socket to create network connections. +* The project currently is Single-Threaded, but will be Multi-Threaded soon. +* The codebase currently rely on shell and interpreter for executing scripts.
+ +**Technologies**: C, HTTP, Socket.IO
+**Maintainer**: [Progyan Bhattacharya](https://github.com/Progyan1997) + +--- + +#### [Tic Tac Toe](https://github.com/BytesClub/Tic_Tac_Toe) +A simple Tic_Tac_Toe implementation in C + +**Brief Explanation**: Tic Tac Toe is the biggest collaborative project on Bytes Club. This is a simple board game impleneted in C to run in terminal. The project currently has:
+* Static Credit screen followed by a Graphical representation of the board using ASCII characters. +* Reload table after each moves given by user. +* Determines winner and avoids multiple input at same place. +* Currently working on Bot player with/without AI capability.
+ +**Technologies**: C, CLI, AI
+**Maintainer**: [Progyan Bhattacharya](https://github.com/Progyan1997) + +--- + +#### [Xplode](https://github.com/BytesClub/Xplode) +A 2D Game based on OpenGL + +**Technologies**: C++, OpenGL
+**Maintainer**: [Rudra Nil Basu](https://github.com/RudraNilBasu)
+**Communication**: [BytesClub/General](https://gitter.im/Bytes_Club/General) on Gitter + +--- + +#### [Tabcalc](https://github.com/BytesClub/Tabcalc) +A simple android scientific calculator using tab views + +**Brief Explanation**: Tabcalc was actually a normal calculator with an ambitious developer wanting to take it a notch higher. Its features are:
+* Light on the eye in the dark +* Swiping tabs make it easier to switch to the scientific format
+ +**Technologies**: Java
+**Maintainer**: [Rohit Das](https://github.com/mouri11) +--- + +### How to apply + +Submit your proposal in a Google Doc format to the [BytesClub mailing list](mailto:bytes-club@googlegroups.com). Make sure you provide permission for mentors to feedbacks. A sample template can be found [here](https://github.com/BytesClub/Guidelines/wiki/Thousand-Lines-of-Code:-Application-Template) + +#### Pre-Requisite +* **Hardware**: Any working computer with atleast pentium core processor and 512MiB RAM +* **Operating System**: Any popular Linux distribution (Ubuntu 16.04 LTS is encouraged for new comers) +* **Version Control System**: Git v2.x (recommended, v1.8.x will also work, but may require modifications) +* **Tracker**: [GitHub in Terminal](https://www.npmjs.com/package/ghb) is Bytes Club's own [repo](https://github.com/BytesClub/ghb). +* **Other**: An active [GitHub](https://github.com/) account and pre-requisites of particular projects available in Docs. + +#### Things to keep in mind: + +0. Make sure you join the Bytes Club [Mailing list](https://groups.google.com/forum/#!forum/bytes-club) and [Gitter Channel](https://gitter.im/Bytes_Club/General). All conversation will take place there. +1. Do not set impossible goal. We are trying to do some real work here. So be as practical as possible. +2. Participants can either work on issues registered already or on their independent ideas. In any case, there will be fixed boundary to which he/she can work on decided by the mentor. +3. Introduce yourself properly mentioning your knowledge and experience properly, remember we will guide you likewise. +4. Although it is okay to propose idea for multiple projects but we strongly encourage you to work on one. +5. In case of multiple submission, the last proposal will be taken into account while evaluating. +6. Communication is an important part of collaborative work. So try to be active as much as possible on our [gitter channel](https://gitter.im/Bytes_Club/General). +7. We will review work progress and our goals in every week or so, according your mentor. +8. The timeline is fixed and we are strict about our [Contribution Guidelines](/contributing/). +9. Make sure you have some prior contributions to the projects you are planning to contribute during this period, it will be easier for you to get selected if you have prior knowledge about the codebase. + +### Prizes + +On successful completion, the students will recieve: + +* A Bytes Club T-Shirt diff --git a/_assets/ghb.md b/_assets/ghb.md new file mode 100644 index 0000000..207bbaf --- /dev/null +++ b/_assets/ghb.md @@ -0,0 +1,17 @@ +--- +title: ghb +name: GHB - GitHub on Terminal +source: https://github.com/BytesClub/ghb +maintainer: Progyan Bhattacharya +maintainer_github: Progyan1997 +maintainer_desc: 2nd year Undergrad; Web developer, Programmer and Open Source Contributor +technology: Node.js, npm +platform: Linux/Mac/Windows +documentation: +install: +json: ghb +banner: Banner.png +--- + +GHB is a command line tool to fetch, view, modify and add Issues or Pull Requests on GitHub from user's terminal (or command prompt). + diff --git a/_assets/tictactoe.md b/_assets/tictactoe.md new file mode 100644 index 0000000..0d7ba5b --- /dev/null +++ b/_assets/tictactoe.md @@ -0,0 +1,17 @@ +--- +title: tictactoe +name: Tic Tac Toe +source: https://github.com/BytesClub/Tic_Tac_Toe +maintainer: Progyan Bhattacharya +maintainer_github: Progyan1997 +maintainer_desc: 2nd year Undergrad; Web developer, Programmer and Open Source Contributor +technology: C +platform: Linux, Windows & Mac +documentation: +install: +banner: Banner.jpg +json: tic_tac_toe +screenshots: +--- + + A simple Tic_Tac_Toe implementation in C. \ No newline at end of file diff --git a/_assets/xplode.md b/_assets/xplode.md new file mode 100644 index 0000000..e27b666 --- /dev/null +++ b/_assets/xplode.md @@ -0,0 +1,17 @@ +--- +title: xplode +name: Xplode +source: https://github.com/BytesClub/Xplode +maintainer: Rudra Nil Basu +maintainer_github: RudraNilBasu +maintainer_desc: 3rd year CS Undergrad, hobbyist game designer and programmer +technology: C++, opengl +platform: Linux +documentation: +install: +banner: Banner.jpg +json: xplode +screenshots: +--- + +Xplode is a 2D game made with opengl and C++. diff --git a/_config.yml b/_config.yml index 8cf72e8..2ca4891 100644 --- a/_config.yml +++ b/_config.yml @@ -11,7 +11,7 @@ permalink: pretty title: BytesClub tagline: Coding Club, WBUT In-House description: "An open source community for WBUT In-House Students" -url: https://github.com/BytesClub +url: https://bytesclub.github.io/ baseurl: / author: @@ -26,3 +26,31 @@ version: 1.0.1 github: repo: https://github.com/BytesClub + +#Global vars +asset-img-path: /img/assets/ +asset-path: /assets/ +asset-download-path: /downloads/assets/ + +defaults: + - scope: + path: "_assets" + type: assets + values: + layout: asset-view + banner-img: Banner.jpg + two-thirds-img: TwoThirds.jpg + one-third-img: OneThird.jpg + priority: 10 + show: true + file-type: .zip + +collections: + assets: + output: true + permalink: /:collection/:title/ + +jekyll_get: + data: ttt + json: 'https://api.github.com/repos/BytesClub/Tic_Tac_Toe/contributors' + cache: true \ No newline at end of file diff --git a/_data/ghb.json b/_data/ghb.json new file mode 100644 index 0000000..d2909be --- /dev/null +++ b/_data/ghb.json @@ -0,0 +1,22 @@ +[ + { + "login": "Progyan1997", + "id": 14367736, + "avatar_url": "https://avatars2.githubusercontent.com/u/14367736?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/Progyan1997", + "html_url": "https://github.com/Progyan1997", + "followers_url": "https://api.github.com/users/Progyan1997/followers", + "following_url": "https://api.github.com/users/Progyan1997/following{/other_user}", + "gists_url": "https://api.github.com/users/Progyan1997/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Progyan1997/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Progyan1997/subscriptions", + "organizations_url": "https://api.github.com/users/Progyan1997/orgs", + "repos_url": "https://api.github.com/users/Progyan1997/repos", + "events_url": "https://api.github.com/users/Progyan1997/events{/privacy}", + "received_events_url": "https://api.github.com/users/Progyan1997/received_events", + "type": "User", + "site_admin": false, + "contributions": 35 + } +] diff --git a/_data/tic_tac_toe.json b/_data/tic_tac_toe.json new file mode 100644 index 0000000..bd0d9c0 --- /dev/null +++ b/_data/tic_tac_toe.json @@ -0,0 +1,82 @@ +[ + { + "login": "Progyan1997", + "id": 14367736, + "avatar_url": "https://avatars2.githubusercontent.com/u/14367736?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/Progyan1997", + "html_url": "https://github.com/Progyan1997", + "followers_url": "https://api.github.com/users/Progyan1997/followers", + "following_url": "https://api.github.com/users/Progyan1997/following{/other_user}", + "gists_url": "https://api.github.com/users/Progyan1997/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Progyan1997/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Progyan1997/subscriptions", + "organizations_url": "https://api.github.com/users/Progyan1997/orgs", + "repos_url": "https://api.github.com/users/Progyan1997/repos", + "events_url": "https://api.github.com/users/Progyan1997/events{/privacy}", + "received_events_url": "https://api.github.com/users/Progyan1997/received_events", + "type": "User", + "site_admin": false, + "contributions": 53 + }, + { + "login": "satyamvats5", + "id": 25989270, + "avatar_url": "https://avatars2.githubusercontent.com/u/25989270?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/satyamvats5", + "html_url": "https://github.com/satyamvats5", + "followers_url": "https://api.github.com/users/satyamvats5/followers", + "following_url": "https://api.github.com/users/satyamvats5/following{/other_user}", + "gists_url": "https://api.github.com/users/satyamvats5/gists{/gist_id}", + "starred_url": "https://api.github.com/users/satyamvats5/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/satyamvats5/subscriptions", + "organizations_url": "https://api.github.com/users/satyamvats5/orgs", + "repos_url": "https://api.github.com/users/satyamvats5/repos", + "events_url": "https://api.github.com/users/satyamvats5/events{/privacy}", + "received_events_url": "https://api.github.com/users/satyamvats5/received_events", + "type": "User", + "site_admin": false, + "contributions": 6 + }, + { + "login": "RudraNilBasu", + "id": 12744655, + "avatar_url": "https://avatars3.githubusercontent.com/u/12744655?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/RudraNilBasu", + "html_url": "https://github.com/RudraNilBasu", + "followers_url": "https://api.github.com/users/RudraNilBasu/followers", + "following_url": "https://api.github.com/users/RudraNilBasu/following{/other_user}", + "gists_url": "https://api.github.com/users/RudraNilBasu/gists{/gist_id}", + "starred_url": "https://api.github.com/users/RudraNilBasu/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/RudraNilBasu/subscriptions", + "organizations_url": "https://api.github.com/users/RudraNilBasu/orgs", + "repos_url": "https://api.github.com/users/RudraNilBasu/repos", + "events_url": "https://api.github.com/users/RudraNilBasu/events{/privacy}", + "received_events_url": "https://api.github.com/users/RudraNilBasu/received_events", + "type": "User", + "site_admin": false, + "contributions": 3 + }, + { + "login": "Amitava123", + "id": 26063103, + "avatar_url": "https://avatars2.githubusercontent.com/u/26063103?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/Amitava123", + "html_url": "https://github.com/Amitava123", + "followers_url": "https://api.github.com/users/Amitava123/followers", + "following_url": "https://api.github.com/users/Amitava123/following{/other_user}", + "gists_url": "https://api.github.com/users/Amitava123/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Amitava123/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Amitava123/subscriptions", + "organizations_url": "https://api.github.com/users/Amitava123/orgs", + "repos_url": "https://api.github.com/users/Amitava123/repos", + "events_url": "https://api.github.com/users/Amitava123/events{/privacy}", + "received_events_url": "https://api.github.com/users/Amitava123/received_events", + "type": "User", + "site_admin": false, + "contributions": 1 + } +] diff --git a/_data/xplode.json b/_data/xplode.json new file mode 100644 index 0000000..fd36e50 --- /dev/null +++ b/_data/xplode.json @@ -0,0 +1,22 @@ +[ + { + "login": "RudraNilBasu", + "id": 12744655, + "avatar_url": "https://avatars3.githubusercontent.com/u/12744655?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/RudraNilBasu", + "html_url": "https://github.com/RudraNilBasu", + "followers_url": "https://api.github.com/users/RudraNilBasu/followers", + "following_url": "https://api.github.com/users/RudraNilBasu/following{/other_user}", + "gists_url": "https://api.github.com/users/RudraNilBasu/gists{/gist_id}", + "starred_url": "https://api.github.com/users/RudraNilBasu/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/RudraNilBasu/subscriptions", + "organizations_url": "https://api.github.com/users/RudraNilBasu/orgs", + "repos_url": "https://api.github.com/users/RudraNilBasu/repos", + "events_url": "https://api.github.com/users/RudraNilBasu/events{/privacy}", + "received_events_url": "https://api.github.com/users/RudraNilBasu/received_events", + "type": "User", + "site_admin": false, + "contributions": 18 + } +] diff --git a/_includes/.browse-medium.html.swp b/_includes/.browse-medium.html.swp new file mode 100644 index 0000000..d883ff1 Binary files /dev/null and b/_includes/.browse-medium.html.swp differ diff --git a/_includes/browse-medium.html b/_includes/browse-medium.html new file mode 100644 index 0000000..354383d --- /dev/null +++ b/_includes/browse-medium.html @@ -0,0 +1,34 @@ +
+ {% assign name = include.asset.title | remove: " -" | replace: " ", "-" | downcase %} + {% assign img-path = site.asset-img-path | append: name %} + + {{include.asset.title}} + +
+ + + diff --git a/_includes/sidebar.html b/_includes/sidebar.html index 4c0ded6..cc09428 100644 --- a/_includes/sidebar.html +++ b/_includes/sidebar.html @@ -27,7 +27,7 @@

{% endif %} {% endfor %} -Join the chat at https://gitter.im/NIT-dgp/General +Join the chat at https://gitter.im/Bytes_Club/General +{% endfor %} +

+ +

+{% for member in site.data.ttt %} + Hello +{% endfor %} +

+ + diff --git a/_plugins/jekyll_get.rb b/_plugins/jekyll_get.rb new file mode 100644 index 0000000..c6f8e3c --- /dev/null +++ b/_plugins/jekyll_get.rb @@ -0,0 +1,40 @@ +require 'json' +require 'hash-joiner' +require 'open-uri' + +module Jekyll_Get + class Generator < Jekyll::Generator + safe true + priority :highest + + def generate(site) + config = site.config['jekyll_get'] + if !config + return + end + if !config.kind_of?(Array) + config = [config] + end + config.each do |d| + begin + target = site.data[d['data']] + source = JSON.load(open(d['json'])) + if target + HashJoiner.deep_merge target, source + else + site.data[d['data']] = source + end + if d['cache'] + data_source = (site.config['data_source'] || '_data') + path = "#{data_source}/#{d['data']}.json" + open(path, 'wb') do |file| + file << JSON.generate(site.data[d['data']]) + end + end + rescue + next + end + end + end + end +end \ No newline at end of file diff --git a/_posts/2017-02-23-introduction-to-git.md b/_posts/2017-02-23-introduction-to-git.md index 4d102cd..24a8b59 100644 --- a/_posts/2017-02-23-introduction-to-git.md +++ b/_posts/2017-02-23-introduction-to-git.md @@ -1,162 +1,200 @@ ---- -layout: post -title: Introduction to Git and GitHub ---- - -> "Real men use the command line" - -# Git - -Git is a [version control system](https://en.wikipedia.org/wiki/Version_control) to track changes in files in a computer and allow multiple people to work on those files. It was created by [Linus Torvalds](https://www.youtube.com/watch?v=IVpOyKCNZYw) [^ted], in less than 2 weeks. - - -### Why we need git - -Simply put, it is like checkpoints in games, and we can fearlessly modify code, without creating a backup, removing the need to do this: - -![copy](/images/git/git-copies.png) - -Git is also fully distributive, allowing multiple people to work on a project easily, and maintaining the changes made by them. - -![copy](/images/git/vc.png) - -### Installing git - -Git is installed on Debian/Ubuntu, from the package manager by: - -``` -sudo apt-get install git -``` - -### Create a git repository - -To create a new git repository, create a new directory, go to the directory via the terminal, and perform a - -``` -git init -``` -to create a new git repository - -### Add changes - -After modifying/adding files on the repository, to add the changes made to the files in the staging area, use the `git add` command - -``` -git add -``` - -To add all changed files to the staged area, use: - -``` -git add -A -``` - -### Creating a checkpoint - -Checkpoints in `git` is called a `commit`, and we use the command `git commit`. Basically `git commit` records the changes to the repository. - -For a single line commit message, this is used: - -``` -git commit -m -``` - -### Remotes - -The changes in git are made on a local copy of the repository. To communicate this with the outside world, git uses _remotes_. These are the repositories other than the repository on your local disc where you can push the changes made from the local repository. To create a new remote, named _origin_ (it can be any other name) we use: - -``` -git remote add origin -``` - -This creates a new remote called `origin` located at ``. Once this is done, we can just write _origin_ in the push command instead of typing the whole URL. - -For more explanations, check footnotes [^remote] - -### Cloning a repository - -Instead of creating a fresh new repository, one may need to work on an already existing repository. For this purpose, cloning a repository comes handy. - -``` -git clone -``` - -This helps in creating a local copy of the repository present in ``. In this case, the remotes will automatically be set. - -### Branches - -Branches in git is used to develop features isolated from each other. Every git repository has a default branch called `master`. - -![branch](/images/git/branch.png) - -Use other branches at the development stage and merge them to master on completion. - -To create a new branch and switch to that branch, use: - -``` -git checkout -b -``` - -To switch back to the master branch, use: - -``` -git checkout master -``` - -Rather, to switch to any existing branch, use: - -``` -git checkout -``` - -To delete an existing branch, - -``` -git branch -d -``` - -### Sending your commits - -As of now, all your changes are present in your local repository only. To send these changes to the remote repository, git uses `push`. The syntax of which looks like: - -``` -git push -``` - -If you want to send the changes (commits) made on the `master` branch on the remote repository described by the `origin` remote, use: - -``` -git push origin master -``` - -### Git Structure - -The very basic structure of git looks like the following: - -![struct](/images/git/structure.png) - -# Github - -> Github != git - -Github is a company that allows anyone to host their git repositories. Lot's of major open source projects are hosted on GitHub, the most popular (and the most active) being the [Linux Kernel](https://github.com/torvalds/linux). Many well known companies host their open source projects on GitHub like [Google](https://github.com/google), [Facebook](https://github.com/facebook) to just name a few. - -### Issues - -GitHub has a facility called _issues_, which allows *anyone* to file a bug report, problems related to the project or feature requests related to the project. If you are a developer wishing to contribute to the project, look through the issues and try to fix them. Also, look for the labels in each issue, if you are a beginner or willing to work on something specific. - -**But wait!** - -You may not have the permission to write on `origin`, what then ? - -### Forks - -Forking a repository means you have a copy of one repository on your own profile. You will have write access to your forked repository. Push the changes to the forked repository as a remote. - -### Pull Requests - -To get the original repositories check out your contributions to their project, you need to create a Pull Request. Create a Pull Request to the original repository, describing the changes you have made. The maintainers of the project will review it, and if they are satisfied with the changes, they will merge the Pull Request, and your code will be reflected on the original project. - -[^ted]: [The mind behind Linux - Linus Torvalds](https://youtu.be/o8NPllzkFhE) -[^remote]: [What is `git add remote` and `git push origin master`](http://stackoverflow.com/questions/5617211/what-is-git-remote-add-and-git-push-origin-master/5617350#5617350) - +--- +layout: post +title: Introduction to Git and GitHub +--- + +> "Real men use the command line" + +# Git + +Git is a [version control system](https://en.wikipedia.org/wiki/Version_control) to track changes in files in a computer and allow multiple people to work on those files. It was created by [Linus Torvalds](https://www.youtube.com/watch?v=IVpOyKCNZYw) [^ted], in less than 2 weeks. + + +### Why we need git + +Simply put, it is like checkpoints in games, and we can fearlessly modify code, without creating a backup, removing the need to do this: + +![copy](/images/git/git-copies.png) + +Git is also fully distributive, allowing multiple people to work on a project easily, and maintaining the changes made by them. + +![copy](/images/git/vc.png) + +### Installing git + +Git is installed on Debian/Ubuntu, from the package manager by: + +``` +sudo apt-get install git +``` + +### Create a git repository + +To create a new git repository, create a new directory, go to the directory via the terminal, and perform a + +``` +git init +``` +to create a new git repository + +### Add changes + +After modifying/adding files on the repository, to add the changes made to the files in the staging area, use the `git add` command + +``` +git add +``` + +To add all changed files to the staged area, use: + +``` +git add -A +``` + +### Creating a checkpoint + +Checkpoints in `git` is called a `commit`, and we use the command `git commit`. Basically `git commit` records the changes to the repository. + +For a single line commit message, this is used: + +``` +git commit -m +``` + +### Remotes + +The changes in git are made on a local copy of the repository. To communicate this with the outside world, git uses _remotes_. These are the repositories other than the repository on your local disc where you can push the changes made from the local repository. To create a new remote, named _origin_ (it can be any other name) we use: + +``` +git remote add origin +``` + +This creates a new remote called `origin` located at ``. Once this is done, we can just write _origin_ in the push command instead of typing the whole URL. + +For more explanations, check footnotes [^remote] + +### Cloning a repository + +Instead of creating a fresh new repository, one may need to work on an already existing repository. For this purpose, cloning a repository comes handy. + +``` +git clone +``` + +This helps in creating a local copy of the repository present in ``. In this case, the remotes will automatically be set. + +### Branches + +Branches in git is used to develop features isolated from each other. Every git repository has a default branch called `master`. + +![branch](/images/git/branch.png) + +Use other branches at the development stage and merge them to master on completion. + +To create a new branch and switch to that branch, use: + +``` +git checkout -b +``` + +To switch back to the master branch, use: + +``` +git checkout master +``` + +Rather, to switch to any existing branch, use: + +``` +git checkout +``` + +To delete an existing branch, + +``` +git branch -d +``` + +### Sending your commits + +As of now, all your changes are present in your local repository only. To send these changes to the remote repository, git uses `push`. The syntax of which looks like: + +``` +git push +``` + +If you want to send the changes (commits) made on the `master` branch on the remote repository described by the `origin` remote, use: + +``` +git push origin master +``` + +### HEAD + +`HEAD` is a reference to the last commit in the currently checked out branch. [^head] + +### Diffs + +`git diff` shows changes between commits, commit and working directory, etc. +To see the uncommitted changes made, use: + +``` +git diff +``` + +For showing the changes made in the last `x` (let it be 3 here) commits [^diff_commit], use: + +``` +git diff HEAD~3..HEAD +``` + +By default, `git diff` only splits out three lines of context above and below the changes. [^diff_full] [^diff_full_2] To view the entire file, we use: + +``` +git diff --no-prefix -U1000 +``` + +To save the diff in a file, use: + +``` +git diff > patch.diff +``` + +View [the documentations](https://git-scm.com/docs/git-diff) for more. + +### Git Structure + +The very basic structure of git looks like the following: + +![struct](/images/git/structure.png) + +# Github + +> Github != git + +Github is a company that allows anyone to host their git repositories. Lot's of major open source projects are hosted on GitHub, the most popular (and the most active) being the [Linux Kernel](https://github.com/torvalds/linux). Many well known companies host their open source projects on GitHub like [Google](https://github.com/google), [Facebook](https://github.com/facebook) to just name a few. + +### Issues + +GitHub has a facility called _issues_, which allows *anyone* to file a bug report, problems related to the project or feature requests related to the project. If you are a developer wishing to contribute to the project, look through the issues and try to fix them. Also, look for the labels in each issue, if you are a beginner or willing to work on something specific. + +**But wait!** + +You may not have the permission to write on `origin`, what then ? + +### Forks + +Forking a repository means you have a copy of one repository on your own profile. You will have write access to your forked repository. Push the changes to the forked repository as a remote. + +Protip: Do not fork a repository unless you are going to contribute to it + +### Pull Requests + +To get the original repositories check out your contributions to their project, you need to create a Pull Request. Create a Pull Request to the original repository, describing the changes you have made. The maintainers of the project will review it, and if they are satisfied with the changes, they will merge the Pull Request, and your code will be reflected on the original project. + +[^ted]: [The mind behind Linux - Linus Torvalds](https://youtu.be/o8NPllzkFhE) +[^remote]: [What is `git add remote` and `git push origin master`](http://stackoverflow.com/questions/5617211/what-is-git-remote-add-and-git-push-origin-master/5617350#5617350) +[^head]: [What is the HEAD in git?](http://stackoverflow.com/questions/2529971/what-is-the-head-in-git) +[^diff_full]: [git diff with full context](https://trillworks.com/nick/2013/06/26/git-diff-with-full-context/) +[^diff_commit]: [create a patch for the last 2 revisions.](http://stackoverflow.com/questions/2217452/in-git-how-do-i-create-a-single-patch-for-the-last-2-revisions) +[^diff_full_2]: [git diff with full context](http://stackoverflow.com/questions/13627598/how-to-get-git-diff-with-full-context) diff --git a/project/battery_manager.md b/_projects/battery_manager.md similarity index 100% rename from project/battery_manager.md rename to _projects/battery_manager.md diff --git a/_site/2017/02/18/introducing-bytesclub/index.html b/_site/2017/02/18/introducing-bytesclub/index.html index 3dabd10..391492e 100644 --- a/_site/2017/02/18/introducing-bytesclub/index.html +++ b/_site/2017/02/18/introducing-bytesclub/index.html @@ -57,14 +57,16 @@

- About + Thousand Lines of Code - - + About + + + @@ -90,7 +92,7 @@

-Join the chat at https://gitter.im/NIT-dgp/General +Join the chat at https://gitter.im/Bytes_Club/General + + + + + Thousand Lines of Code · BytesClub + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Thousand Lines of Code

+

logo

+ +

Thousand Lines of Code (TLoC) is a open source program initiated by Bytes Club to bring more students into open source development. Students will have to work under their mentors on one or more project for a span of 3 months during their semester breaks

+ +

Timeline

+ +
    +
  • 17-June-2017: Program Launched and Idea Accepting Starts
  • +
  • 14-July-2017: Idea Accepting Ends
  • +
  • 15-July-2017: Peer Bonding and Project Analysis
  • +
  • 1st-August-2017: Actual Coding Program Starts
  • +
  • 30-September-2017: Program Ends and Result Declaration
  • +
+ +

Available Projects

+ +
+ +

Chalk

+

A command line text editor written in C

+ +

Brief Explanation: Currently chalk is in a very early stage of development. The idea of this project is to complete the basic version 1.0 of chalk along with it’s documentation:
+* Accepting input from the user and producing the output
+* Ability to view and edit the contents of a file effectively
+* Searching
+* Syntax highlighting
+* Documentation of the overall project, using Sphinx

+ +

Technologies: C, CLI
+Maintainer: Rudra Nil Basu
+Communication: BytesClub/General on Gitter

+ +
+ +

MAKAUT Connect

+

A web application for MAKAUT students to get notified about lectures, events and exams.

+ +

Technologies: NodeJS, React-Redux-Webpack, RESTful API
+Maintainer: Progyan Bhattacharya

+ +
+ +

ServerX

+

A HTTP/HTTPS Web Server Handler by (C) Bytes Club

+ +

Technologies: C, HTTP, Socket.IO
+Maintainer: Progyan Bhattacharya

+ +
+ +

Tic Tac Toe

+

A simple Tic_Tac_Toe implementation in C

+ +

Technologies: C, CLI, AI
+Maintainer: Progyan Bhattacharya

+ +
+ +

Xplode

+

A 2D Game based on OpenGL

+ +

Technologies: C++, OpenGL
+Maintainer: Rudra Nil Basu
+Communication: BytesClub/General on Gitter

+ +
+ +

How to apply

+ +

Submit your proposal in a Google Doc format to the BytesClub mailing list. Make sure you provide permission for mentors to feedbacks. A sample template can be found here

+ +

Things to keep in mind:

+ +
    +
  1. Make sure you join the Bytes Club Mailing list and Gitter Channel. All conversation will take place there.
  2. +
  3. Do not set impossible goal. We are trying to do some real work here. So be as practical as possible.
  4. +
  5. Participants can either work on issues registered already or on their independent ideas. In any case, there will be fixed boundary to which he/she can work on decided by the mentor.
  6. +
  7. Introduce yourself properly mentioning your knowledge and experience properly, remember we will guide you likewise.
  8. +
  9. Although it is okay to propose idea for multiple projects but we strongly encourage you to work on one.
  10. +
  11. In case of multiple submission, the last proposal will be taken into account while evaluating.
  12. +
  13. Communication is an important part of collaborative work. So try to be active as much as possible on our gitter channel.
  14. +
  15. We will review work progress and our goals in every week or so, according your mentor.
  16. +
  17. The timeline is fixed and we are strict about our Contribution Guidelines.
  18. +
  19. Make sure you have some prior contributions to the projects you are planning to contribute during this period, it will be easier for you to get selected if you have prior knowledge about the codebase.
  20. +
+ +

Prizes

+ +

On successful completion, the students will recieve:

+ +
    +
  • A Bytes Club T-Shirt
  • +
+ +
+ +
+ + + diff --git a/_site/about/index.html b/_site/about/index.html index 635c564..abab3ff 100644 --- a/_site/about/index.html +++ b/_site/about/index.html @@ -57,17 +57,19 @@

- About + Thousand Lines of Code - - + + About + + Contribution @@ -90,7 +92,7 @@

-Join the chat at https://gitter.im/NIT-dgp/General +Join the chat at https://gitter.im/Bytes_Club/General

Bytes Club is an open source community by the students of WBUT In-House.

@@ -136,6 +139,12 @@

Contact Us

  • Facebook Group, if you are a student of WBUT In-House
  • + + +

    To donate to Bytes Club, use this:

    + +

    img

    + diff --git a/_site/assets/Xplode/index.html b/_site/assets/Xplode/index.html new file mode 100644 index 0000000..b1f701b --- /dev/null +++ b/_site/assets/Xplode/index.html @@ -0,0 +1,202 @@ + + + + + + + + + + + + + + xplode · BytesClub + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    +

    + +
    +
    + +
    +
    +
    +
      +
    • Made with:
    • +
    • Platform:
    • +
    • Genre:
    • +
    • Type:
    • +
    • Role:
    • +
    + Download +
    + +
    +
    + + + + +
    + + + diff --git a/_site/assets/ghb/index.html b/_site/assets/ghb/index.html new file mode 100644 index 0000000..e6c7685 --- /dev/null +++ b/_site/assets/ghb/index.html @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + ghb · BytesClub + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    +

    GHB - GitHub on Terminal

    + +
    +
    + +
    +
    +
    +
      +
    • Technology: Node.js, npm
    • +
    • Platform: Linux/Mac/Windows
    • +
    • Documentations:
    • +
    • Install instructions:
    • +
    + View Source Code +
    + +
    +
    + + +







    + +

    Maintainer

    +
    + +
    + + +







    + +

    Contributors

    + +

    + +

    + + +

    + +

    + +

    + + + +
    + + + diff --git a/_site/assets/hue.md b/_site/assets/hue.md new file mode 100644 index 0000000..e69de29 diff --git a/_site/assets/hue/index.html b/_site/assets/hue/index.html new file mode 100644 index 0000000..d8824a8 --- /dev/null +++ b/_site/assets/hue/index.html @@ -0,0 +1,202 @@ + + + + + + + + + + + + + + hue · BytesClub + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    +

    + +
    +
    + +
    +
    +
    +
      +
    • Made with:
    • +
    • Platform:
    • +
    • Genre:
    • +
    • Type:
    • +
    • Role:
    • +
    + Download +
    + +
    +
    + + + + +
    + + + diff --git a/_site/assets/tictactoe/index.html b/_site/assets/tictactoe/index.html new file mode 100644 index 0000000..63d5cc5 --- /dev/null +++ b/_site/assets/tictactoe/index.html @@ -0,0 +1,266 @@ + + + + + + + + + + + + + + tictactoe · BytesClub + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    +

    Tic Tac Toe

    + +
    +
    + +
    +
    +
    +
      +
    • Technology: C
    • +
    • Platform: Linux, Windows & Mac
    • +
    • Documentations:
    • +
    • Install instructions:
    • +
    + View Source Code +
    + +
    +
    + + +







    + +

    Maintainer

    +
    + +
    + + +







    + +

    Contributors

    + +

    + +

    + + + + + + + + + + + +

    + +

    + +

    + + + +
    + + + diff --git a/_site/assets/xplode-(copy)/index.html b/_site/assets/xplode-(copy)/index.html new file mode 100644 index 0000000..9d516a8 --- /dev/null +++ b/_site/assets/xplode-(copy)/index.html @@ -0,0 +1,248 @@ + + + + + + + + + + + + + + xplode · BytesClub + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    +

    Xplode

    + +
    +
    + +
    +
    +
    +
      +
    • Technology: C++, opengl
    • +
    • Platform: Linux
    • +
    • Documentations:
    • +
    • Install instructions:
    • +
    + View Source Code +
    + +
    +
    + + +







    + +

    Maintainer

    +
    + +
    + + +







    + +

    Contributors

    + +

    + + + + + + + + + + + + + + + + + + + + + +

    + +

    + +

    + + + +
    + + + diff --git a/_site/assets/xplode/index.html b/_site/assets/xplode/index.html new file mode 100644 index 0000000..3da2a97 --- /dev/null +++ b/_site/assets/xplode/index.html @@ -0,0 +1,242 @@ + + + + + + + + + + + + + + xplode · BytesClub + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    +

    Xplode

    + +
    +
    + +
    +
    +
    +
      +
    • Technology: C++, opengl
    • +
    • Platform: Linux
    • +
    • Documentations:
    • +
    • Install instructions:
    • +
    + View Source Code +
    + +
    +
    + + +







    + +

    Maintainer

    +
    + +
    + + +







    + +

    Contributors

    + +

    + +

    + + +

    + +

    + +

    + + + +
    + + + diff --git a/_site/atom.xml b/_site/atom.xml index 6965356..7abbc0b 100644 --- a/_site/atom.xml +++ b/_site/atom.xml @@ -2,10 +2,10 @@ BytesClub - - - 2017-03-01T20:10:29+05:30 - https://github.com/BytesClub + + + 2017-06-28T17:44:56+05:30 + https://bytesclub.github.io/ Bytes CLub @@ -14,9 +14,9 @@ SSH and it's use in GitHub - + 2017-03-01T00:00:00+05:30 - https://github.com/BytesClub/2017/03/01/introduction-to-ssh + https://bytesclub.github.io//2017/03/01/introduction-to-ssh <blockquote> <p>“Privacy is Security, Security is Victory”</p> </blockquote> @@ -74,9 +74,9 @@ SSH provides a secure channel over an unsecured network in a client-server archi Introduction to Git and GitHub - + 2017-02-23T00:00:00+05:30 - https://github.com/BytesClub/2017/02/23/introduction-to-git + https://bytesclub.github.io//2017/02/23/introduction-to-git <blockquote> <p>“Real men use the command line”</p> </blockquote> @@ -204,6 +204,39 @@ SSH provides a secure channel over an unsecured network in a client-server archi </code></pre> </div> +<h3 id="head">HEAD</h3> + +<p><code class="highlighter-rouge">HEAD</code> is a reference to the last commit in the currently checked out branch. <sup id="fnref:head"><a href="#fn:head" class="footnote">3</a></sup></p> + +<h3 id="diffs">Diffs</h3> + +<p><code class="highlighter-rouge">git diff</code> shows changes between commits, commit and working directory, etc. +To see the uncommitted changes made, use:</p> + +<div class="highlighter-rouge"><pre class="highlight"><code>git diff +</code></pre> +</div> + +<p>For showing the changes made in the last <code class="highlighter-rouge">x</code> (let it be 3 here) commits <sup id="fnref:diff_commit"><a href="#fn:diff_commit" class="footnote">4</a></sup>, use:</p> + +<div class="highlighter-rouge"><pre class="highlight"><code>git diff HEAD~3..HEAD +</code></pre> +</div> + +<p>By default, <code class="highlighter-rouge">git diff</code> only splits out three lines of context above and below the changes. <sup id="fnref:diff_full"><a href="#fn:diff_full" class="footnote">5</a></sup> <sup id="fnref:diff_full_2"><a href="#fn:diff_full_2" class="footnote">6</a></sup> To view the entire file, we use:</p> + +<div class="highlighter-rouge"><pre class="highlight"><code>git diff --no-prefix -U1000 +</code></pre> +</div> + +<p>To save the diff in a file, use:</p> + +<div class="highlighter-rouge"><pre class="highlight"><code>git diff &gt; patch.diff +</code></pre> +</div> + +<p>View <a href="https://git-scm.com/docs/git-diff">the documentations</a> for more.</p> + <h3 id="git-structure">Git Structure</h3> <p>The very basic structure of git looks like the following:</p> @@ -230,6 +263,8 @@ SSH provides a secure channel over an unsecured network in a client-server archi <p>Forking a repository means you have a copy of one repository on your own profile. You will have write access to your forked repository. Push the changes to the forked repository as a remote.</p> +<p>Protip: Do not fork a repository unless you are going to contribute to it</p> + <h3 id="pull-requests">Pull Requests</h3> <p>To get the original repositories check out your contributions to their project, you need to create a Pull Request. Create a Pull Request to the original repository, describing the changes you have made. The maintainers of the project will review it, and if they are satisfied with the changes, they will merge the Pull Request, and your code will be reflected on the original project.</p> @@ -242,6 +277,18 @@ SSH provides a secure channel over an unsecured network in a client-server archi <li id="fn:remote"> <p><a href="http://stackoverflow.com/questions/5617211/what-is-git-remote-add-and-git-push-origin-master/5617350#5617350">What is <code class="highlighter-rouge">git add remote</code> and <code class="highlighter-rouge">git push origin master</code></a> <a href="#fnref:remote" class="reversefootnote">&#8617;</a></p> </li> + <li id="fn:head"> + <p><a href="http://stackoverflow.com/questions/2529971/what-is-the-head-in-git">What is the HEAD in git?</a> <a href="#fnref:head" class="reversefootnote">&#8617;</a></p> + </li> + <li id="fn:diff_commit"> + <p><a href="http://stackoverflow.com/questions/2217452/in-git-how-do-i-create-a-single-patch-for-the-last-2-revisions">create a patch for the last 2 revisions.</a> <a href="#fnref:diff_commit" class="reversefootnote">&#8617;</a></p> + </li> + <li id="fn:diff_full"> + <p><a href="https://trillworks.com/nick/2013/06/26/git-diff-with-full-context/">git diff with full context</a> <a href="#fnref:diff_full" class="reversefootnote">&#8617;</a></p> + </li> + <li id="fn:diff_full_2"> + <p><a href="http://stackoverflow.com/questions/13627598/how-to-get-git-diff-with-full-context">git diff with full context</a> <a href="#fnref:diff_full_2" class="reversefootnote">&#8617;</a></p> + </li> </ol> </div> @@ -249,9 +296,9 @@ SSH provides a secure channel over an unsecured network in a client-server archi Bytes Club - + 2017-02-18T00:00:00+05:30 - https://github.com/BytesClub/2017/02/18/introducing-bytesclub + https://bytesclub.github.io//2017/02/18/introducing-bytesclub <p>Bytes Club is an open source community by the students of WBUT In-House.</p> <h3 id="contributing">Contributing</h3> diff --git a/_site/contributing/index.html b/_site/contributing/index.html index a537d0c..8a8279e 100644 --- a/_site/contributing/index.html +++ b/_site/contributing/index.html @@ -57,14 +57,16 @@

    - About + Thousand Lines of Code - - + About + + + @@ -90,7 +92,7 @@

    -Join the chat at https://gitter.im/NIT-dgp/General +Join the chat at https://gitter.im/Bytes_Club/General
    @@ -185,7 +187,7 @@

    -
    +

    @@ -364,7 +413,7 @@

    -

    Bytes Club is an open source community by the students of WBUT In-House.

    +

    @@ -392,6 +441,7 @@

    Contact Us

    Newer + diff --git a/_site/members/index.html b/_site/members/index.html index 86db16c..af47f18 100644 --- a/_site/members/index.html +++ b/_site/members/index.html @@ -57,14 +57,16 @@

    - About + Thousand Lines of Code - - + About + + + @@ -90,7 +92,7 @@

    -Join the chat at https://gitter.im/NIT-dgp/General +Join the chat at https://gitter.im/Bytes_Club/General diff --git a/_site/projects/index.html b/_site/projects/index.html index 2d0158d..51e7828 100644 --- a/_site/projects/index.html +++ b/_site/projects/index.html @@ -57,14 +57,16 @@

    - About + Thousand Lines of Code - - + About + + + @@ -90,7 +92,7 @@

    -Join the chat at https://gitter.im/NIT-dgp/General +Join the chat at https://gitter.im/Bytes_Club/General -

    A python script to notify when the battery is fully charged.

    -

    scr

    +
    + + + + tictactoe + +
    + + + -

    Project Link

    -

    How to contribute: Read README

    +
    + + + + xplode + +
    -

    Contributors

    + + + + + + - + diff --git a/about.md b/about.md index 8ffdf69..cbe33ef 100644 --- a/about.md +++ b/about.md @@ -9,7 +9,8 @@ title: About ## Bytes Club -![logo](/images/bytes_club_logo.jpg) +![logo]({{ site.baseurl }}images/bytes_club_logo.jpg) + Bytes Club is an open source community by the students of WBUT In-House. @@ -19,8 +20,14 @@ Follow our [Contributing guidelines](/contributing) to get started. ### Contact Us -Contact us on: +Contact us on: * [#Bytes_Club/General](https://gitter.im/Bytes_Club/General) Gitter channel * Mailing List- [bytes-club@googlegroups.com](mailto:bytes-club@googlegroups.com) * [Facebook Group](https://www.facebook.com/groups/718359538212066/), if you are a student of WBUT In-House + +### Donate + +To donate to Bytes Club, use this: + +![img]({{ site.baseurl }}images/fund.png) diff --git a/contributing.md b/contributing.md index d68f97b..80bf31b 100644 --- a/contributing.md +++ b/contributing.md @@ -15,7 +15,7 @@ If you wish to add a repository in the organisation, write about the project det ##### Creating issues * If you find any issues/feature enhancement regarding any project, go to the issues tab and create an issue regarding it. -* Provide proper labels for the issue. If it is an enhancement use the `enhancement` label, if it is a bug, use the `bug` label. + ##### Solving an issue * Go to the issues tab, and look for the issues which interests you. If you are a beginner, look for the label `dificulty/easy` to start with. @@ -34,6 +34,26 @@ shortlog: commit message commit body fixes # + +Signed-off-by: [Your name] ``` +Keep in mind the following points while writting a commit message + + - Separate subject from body with a blank line + - Limit the subject line to 50 characters + - Capitalize the subject line + - Do not end the subject line with a period + - Use the imperative mood in the subject line + - Wrap the body at 72 characters + - Use the body to explain what and why vs. how + For more information about proper commit messages, read [this](https://chris.beams.io/posts/git-commit/). + +### Coding Conventions + +We follow [the Linux Kernel's coding convention]({{ site.baseurl }}docs/coding_style.pdf). + +----- + +More about git [here](/docs/git.pptx) \ No newline at end of file diff --git a/docs/Coding-Practices.pdf b/docs/Coding-Practices.pdf new file mode 100644 index 0000000..288968c Binary files /dev/null and b/docs/Coding-Practices.pdf differ diff --git a/docs/Pro Git.md b/docs/Pro Git.md new file mode 100644 index 0000000..28792ac --- /dev/null +++ b/docs/Pro Git.md @@ -0,0 +1,286 @@ +# Pro Git +Written by Scott Chacon and Ben Straub and published by Apress, is available here. All content is licensed under the Creative Commons Attribution Non Commercial Share Alike 3.0 license. + + +## Chapter 1 : Getting Started + +### 1.1 Getting Started - About Version Control + +This chapter will be about getting started with Git. We will begin by explaining some background on version control tools, then move on to how to get Git running on your system and finally how to get it set up to start working with. At the end of this chapter you should understand why Git is around, why you should use it and you should be all set up to do so. +#### About Version Control + +What is "version control", and why should you care? Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later. For the examples in this book you will use software source code as the files being version controlled, though in reality you can do this with nearly any type of file on a computer. + +If you are a graphic or web designer and want to keep every version of an image or layout (which you would most certainly want to), a Version Control System (VCS) is a very wise thing to use. It allows you to revert files back to a previous state, revert the entire project back to a previous state, compare changes over time, see who last modified something that might be causing a problem, who introduced an issue and when, and more. Using a VCS also generally means that if you screw things up or lose files, you can easily recover. In addition, you get all this for very little overhead. +##### Local Version Control Systems + +Many people’s version-control method of choice is to copy files into another directory (perhaps a time-stamped directory, if they’re clever). This approach is very common because it is so simple, but it is also incredibly error prone. It is easy to forget which directory you’re in and accidentally write to the wrong file or copy over files you don’t mean to. + +To deal with this issue, programmers long ago developed local VCSs that had a simple database that kept all the changes to files under revision control. +Local version control diagram +![Figure 1. Local version control.](https://git-scm.com/book/en/v2/images/local.png) + +One of the more popular VCS tools was a system called RCS, which is still distributed with many computers today. Even the popular Mac OS X operating system includes the rcs command when you install the Developer Tools. RCS works by keeping patch sets (that is, the differences between files) in a special format on disk; it can then re-create what any file looked like at any point in time by adding up all the patches. +##### Centralized Version Control Systems + +The next major issue that people encounter is that they need to collaborate with developers on other systems. To deal with this problem, Centralized Version Control Systems (CVCSs) were developed. These systems, such as CVS, Subversion, and Perforce, have a single server that contains all the versioned files, and a number of clients that check out files from that central place. For many years, this has been the standard for version control. +Centralized version control diagram +![Figure 2. Centralized version control.](https://git-scm.com/book/en/v2/images/centralized.png) + +This setup offers many advantages, especially over local VCSs. For example, everyone knows to a certain degree what everyone else on the project is doing. Administrators have fine-grained control over who can do what; and it’s far easier to administer a CVCS than it is to deal with local databases on every client. + +However, this setup also has some serious downsides. The most obvious is the single point of failure that the centralized server represents. If that server goes down for an hour, then during that hour nobody can collaborate at all or save versioned changes to anything they’re working on. If the hard disk the central database is on becomes corrupted, and proper backups haven’t been kept, you lose absolutely everything – the entire history of the project except whatever single snapshots people happen to have on their local machines. Local VCS systems suffer from this same problem – whenever you have the entire history of the project in a single place, you risk losing everything. +##### Distributed Version Control Systems + +This is where Distributed Version Control Systems (DVCSs) step in. In a DVCS (such as Git, Mercurial, Bazaar or Darcs), clients don’t just check out the latest snapshot of the files: they fully mirror the repository. Thus if any server dies, and these systems were collaborating via it, any of the client repositories can be copied back up to the server to restore it. Every clone is really a full backup of all the data. +Distributed version control diagram +![Figure 3. Distributed version control.](https://git-scm.com/book/en/v2/images/distributed.png) + +Furthermore, many of these systems deal pretty well with having several remote repositories they can work with, so you can collaborate with different groups of people in different ways simultaneously within the same project. This allows you to set up several types of workflows that aren’t possible in centralized systems, such as hierarchical models. + +### 1.2 Getting Started - A Short History of Git +#### A Short History of Git + +As with many great things in life, Git began with a bit of creative destruction and fiery controversy. + +The Linux kernel is an open source software project of fairly large scope. For most of the lifetime of the Linux kernel maintenance (1991–2002), changes to the software were passed around as patches and archived files. In 2002, the Linux kernel project began using a proprietary DVCS called BitKeeper. + +In 2005, the relationship between the community that developed the Linux kernel and the commercial company that developed BitKeeper broke down, and the tool’s free-of-charge status was revoked. This prompted the Linux development community (and in particular Linus Torvalds, the creator of Linux) to develop their own tool based on some of the lessons they learned while using BitKeeper. Some of the goals of the new system were as follows: + + * Speed + + * Simple design + + * Strong support for non-linear development (thousands of parallel branches) + + * Fully distributed + + * Able to handle large projects like the Linux kernel efficiently (speed and data size) + +Since its birth in 2005, Git has evolved and matured to be easy to use and yet retain these initial qualities. It’s incredibly fast, it’s very efficient with large projects, and it has an incredible branching system for non-linear development (See **Git Branching**). + +### 1.3 Getting Started - Git Basics +#### Git Basics + +So, what is Git in a nutshell? This is an important section to absorb, because if you understand what Git is and the fundamentals of how it works, then using Git effectively will probably be much easier for you. As you learn Git, try to clear your mind of the things you may know about other VCSs, such as Subversion and Perforce; doing so will help you avoid subtle confusion when using the tool. Git stores and thinks about information much differently than these other systems, even though the user interface is fairly similar, and understanding those differences will help prevent you from becoming confused while using it. +##### Snapshots, Not Differences + +The major difference between Git and any other VCS (Subversion and friends included) is the way Git thinks about its data. Conceptually, most other systems store information as a list of file-based changes. These systems (CVS, Subversion, Perforce, Bazaar, and so on) think of the information they keep as a set of files and the changes made to each file over time. +Storing data as changes to a base version of each file. +![Figure 4. Storing data as changes to a base version of each file.](https://git-scm.com/book/en/v2/images/deltas.png) + +Git doesn’t think of or store its data this way. Instead, Git thinks of its data more like a set of snapshots of a miniature filesystem. Every time you commit, or save the state of your project in Git, it basically takes a picture of what all your files look like at that moment and stores a reference to that snapshot. To be efficient, if files have not changed, Git doesn’t store the file again, just a link to the previous identical file it has already stored. Git thinks about its data more like a **stream of snapshots**. +Git stores data as snapshots of the project over time. +![Figure 5. Storing data as snapshots of the project over time.](https://git-scm.com/book/en/v2/images/snapshots.png) + +This is an important distinction between Git and nearly all other VCSs. It makes Git reconsider almost every aspect of version control that most other systems copied from the previous generation. This makes Git more like a mini filesystem with some incredibly powerful tools built on top of it, rather than simply a VCS. We’ll explore some of the benefits you gain by thinking of your data this way when we cover Git branching in **Git Branching**. +##### Nearly Every Operation Is Local + +Most operations in Git only need local files and resources to operate – generally no information is needed from another computer on your network. If you’re used to a CVCS where most operations have that network latency overhead, this aspect of Git will make you think that the gods of speed have blessed Git with unworldly powers. Because you have the entire history of the project right there on your local disk, most operations seem almost instantaneous. + +For example, to browse the history of the project, Git doesn’t need to go out to the server to get the history and display it for you – it simply reads it directly from your local database. This means you see the project history almost instantly. If you want to see the changes introduced between the current version of a file and the file a month ago, Git can look up the file a month ago and do a local difference calculation, instead of having to either ask a remote server to do it or pull an older version of the file from the remote server to do it locally. + +This also means that there is very little you can’t do if you’re offline or off VPN. If you get on an airplane or a train and want to do a little work, you can commit happily until you get to a network connection to upload. If you go home and can’t get your VPN client working properly, you can still work. In many other systems, doing so is either impossible or painful. In Perforce, for example, you can’t do much when you aren’t connected to the server; and in Subversion and CVS, you can edit files, but you can’t commit changes to your database (because your database is offline). This may not seem like a huge deal, but you may be surprised what a big difference it can make. +##### Git Has Integrity + +Everything in Git is check-summed before it is stored and is then referred to by that checksum. This means it’s impossible to change the contents of any file or directory without Git knowing about it. This functionality is built into Git at the lowest levels and is integral to its philosophy. You can’t lose information in transit or get file corruption without Git being able to detect it. + +The mechanism that Git uses for this checksumming is called a SHA-1 hash. This is a 40-character string composed of hexadecimal characters (0–9 and a–f) and calculated based on the contents of a file or directory structure in Git. A SHA-1 hash looks something like this: +``` +24b9da6552252987aa493b52f8696cd6d3b00373 +``` +You will see these hash values all over the place in Git because it uses them so much. In fact, Git stores everything in its database not by file name but by the hash value of its contents. +##### Git Generally Only Adds Data + +When you do actions in Git, nearly all of them only add data to the Git database. It is hard to get the system to do anything that is not undoable or to make it erase data in any way. As in any VCS, you can lose or mess up changes you haven’t committed yet; but after you commit a snapshot into Git, it is very difficult to lose, especially if you regularly push your database to another repository. + +This makes using Git a joy because we know we can experiment without the danger of severely screwing things up. For a more in-depth look at how Git stores its data and how you can recover data that seems lost, see **Undoing Things**. +##### The Three States + +Now, pay attention. This is the main thing to remember about Git if you want the rest of your learning process to go smoothly. Git has three main states that your files can reside in: committed, modified, and staged. Committed means that the data is safely stored in your local database. Modified means that you have changed the file but have not committed it to your database yet. Staged means that you have marked a modified file in its current version to go into your next commit snapshot. + +This leads us to the three main sections of a Git project: the Git directory, the working tree, and the staging area. +Working tree, staging area, and Git directory. +![Figure 6. Working tree, staging area, and Git directory.](https://git-scm.com/book/en/v2/images/areas.png) + +The Git directory is where Git stores the metadata and object database for your project. This is the most important part of Git, and it is what is copied when you clone a repository from another computer. + +The working tree is a single checkout of one version of the project. These files are pulled out of the compressed database in the Git directory and placed on disk for you to use or modify. + +The staging area is a file, generally contained in your Git directory, that stores information about what will go into your next commit. It’s sometimes referred to as the “index”, but it’s also common to refer to it as the staging area. + +The basic Git workflow goes something like this: + + 1. You modify files in your working tree. + 2. You stage the files, adding snapshots of them to your staging area. + 3. You do a commit, which takes the files as they are in the staging area and stores that snapshot permanently to your Git directory. + +If a particular version of a file is in the Git directory, it’s considered committed. If it has been modified and was added to the staging area, it is staged. And if it was changed since it was checked out but has not been staged, it is modified. In **Git Basics**, you’ll learn more about these states and how you can either take advantage of them or skip the staged part entirely. + +### 1.4 Getting Started - The Command Line +#### The Command Line + +There are a lot of different ways to use Git. There are the original command line tools, and there are many graphical user interfaces of varying capabilities. For this book, we will be using Git on the command line. For one, the command line is the only place you can run **all** Git commands – most of the GUIs only implement some subset of Git functionality for simplicity. If you know how to run the command line version, you can probably also figure out how to run the GUI version, while the opposite is not necessarily true. Also, while your choice of graphical client is a matter of personal taste, all users will have the command-line tools installed and available. + +So we will expect you to know how to open Terminal in Mac or Command Prompt or Powershell in Windows. If you don’t know what we’re talking about here, you may need to stop and research that quickly so that you can follow the rest of the examples and descriptions in this book. + +### 1.5 Getting Started - Installing Git +#### Installing Git + +Before you start using Git, you have to make it available on your computer. Even if it’s already installed, it’s probably a good idea to update to the latest version. You can either install it as a package or via another installer, or download the source code and compile it yourself. + +> Note: This book was written using Git version 2.0.0. Though most of the commands we use should work even in ancient versions of Git, some of them might not or might act slightly differently if you’re using an older version. Since Git is quite excellent at preserving backwards compatibility, any version after 2.0 should work just fine. + +##### Installing on Linux + +If you want to install the basic Git tools on Linux via a binary installer, you can generally do so through the basic package-management tool that comes with your distribution. If you’re on Fedora for example, you can use dnf: +``` +$ sudo dnf install git-all +``` +If you’re on a Debian-based distribution like Ubuntu, try apt-get: +``` +$ sudo apt-get install git-all +``` + For more options, there are instructions for installing on several different Unix flavors on the Git website, at [http://git-scm.com/download/linux](http://git-scm.com/download/linux). +##### Installing on Mac + +There are several ways to install Git on a Mac. The easiest is probably to install the Xcode Command Line Tools. On Mavericks (10.9) or above you can do this simply by trying to run git from the Terminal the very first time. If you don’t have it installed already, it will prompt you to install it. + +If you want a more up to date version, you can also install it via a binary installer. An OSX Git installer is maintained and available for download at the Git website, at http://git-scm.com/download/mac. +Git OS X installer. +[Figure 7. Git OS X Installer.](https://git-scm.com/book/en/v2/images/git-osx-installer.png) + +You can also install it as part of the GitHub for Mac install. Their GUI Git tool has an option to install command line tools as well. You can download that tool from the GitHub for Mac website, at [http://mac.github.com](http://mac.github.com). +##### Installing on Windows + +There are also a few ways to install Git on Windows. The most official build is available for download on the Git website. Just go to [http://git-scm.com/download/win](http://git-scm.com/download/win) and the download will start automatically. Note that this is a project called Git for Windows, which is separate from Git itself; for more information on it, go to [https://git-for-windows.github.io/](https://git-for-windows.github.io/). + +To get an automated installation you can use the [Git Chocolatey package](https://chocolatey.org/packages/git). Note that the Chocolatey package is community maintained. + +Another easy way to get Git installed is by installing GitHub for Windows. The installer includes a command line version of Git as well as the GUI. It also works well with Powershell, and sets up solid credential caching and sane CRLF settings. We’ll learn more about those things a little later, but suffice it to say they’re things you want. You can download this from the GitHub for Windows website, at [http://windows.github.com](http://windows.github.com). +##### Installing from Source + +Some people may instead find it useful to install Git from source, because you’ll get the most recent version. The binary installers tend to be a bit behind, though as Git has matured in recent years, this has made less of a difference. + +If you do want to install Git from source, you need to have the following libraries that Git depends on: autotools, curl, zlib, openssl, expat, and libiconv. For example, if you’re on a system that has dnf (such as Fedora) or apt-get (such as a Debian based system), you can use one of these commands to install the minimal dependencies for compiling and installing the Git binaries: +``` +$ sudo dnf install dh-autoreconf curl-devel expat-devel gettext-devel \ + openssl-devel perl-devel zlib-devel +$ sudo apt-get install dh-autoreconf libcurl4-gnutls-dev libexpat1-dev \ + gettext libz-dev libssl-dev +``` +In order to be able to add the documentation in various formats (doc, html, info), these additional dependencies are required (Note: users of RHEL and RHEL-derivatives like CentOS and Scientific Linux will have to [enable the EPEL repository](https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F) to download the `docbook2X` package): +``` +$ sudo dnf install asciidoc xmlto docbook2X getopt +$ sudo apt-get install asciidoc xmlto docbook2x getopt +``` +Additionally, if you’re using Fedora/RHEL/RHEL-derivatives, you need to do this +``` +$ sudo ln -s /usr/bin/db2x_docbook2texi /usr/bin/docbook2x-texi +``` +due to binary name differences. + +When you have all the necessary dependencies, you can go ahead and grab the latest tagged release tarball from several places. You can get it via the Kernel.org site, at [https://www.kernel.org/pub/software/scm/git](https://www.kernel.org/pub/software/scm/git), or the mirror on the GitHub website, at [https://github.com/git/git/releases](https://github.com/git/git/releases). It’s generally a little clearer what the latest version is on the GitHub page, but the kernel.org page also has release signatures if you want to verify your download. + +Then, compile and install: +``` +$ tar -zxf git-2.0.0.tar.gz +$ cd git-2.0.0 +$ make configure +$ ./configure --prefix=/usr +$ make all doc info +$ sudo make install install-doc install-html install-info +``` +After this is done, you can also get Git via Git itself for updates: +``` +$ git clone git://git.kernel.org/pub/scm/git/git.git +``` + +### 1.6 Getting Started - First-Time Git Setup +#### First-Time Git Setup + +Now that you have Git on your system, you’ll want to do a few things to customize your Git environment. You should have to do these things only once on any given computer; they’ll stick around between upgrades. You can also change them at any time by running through the commands again. + +Git comes with a tool called `git config` that lets you get and set configuration variables that control all aspects of how Git looks and operates. These variables can be stored in three different places: + +1. `/etc/gitconfig` file: Contains values for every user on the system and all their repositories. If you pass the option `--system` to `git config`, it reads and writes from this file specifically. + +2. `~/.gitconfig` or `~/.config/git/config` file: Specific to your user. You can make Git read and write to this file specifically by passing the `--global` option. + +3. `config` file in the Git directory (that is, `.git/config`) of whatever repository you’re currently using: Specific to that single repository. + +Each level overrides values in the previous level, so values in `.git/config` trump those in `/etc/gitconfig`. + +On Windows systems, Git looks for the `.gitconfig` file in the `$HOME` directory (`C:\Users\$USER` for most people). It also still looks for `/etc/gitconfig`, although it’s relative to the MSys root, which is wherever you decide to install Git on your Windows system when you run the installer. If you are using version 2.x or later of Git for Windows, there is also a system-level config file at `C:\Documents and Settings\All Users\Application Data\Git\config` on Windows XP, and in `C:\ProgramData\Git\config` on Windows Vista and newer. This config file can only be changed by `git config -f ` as an admin. +##### Your Identity + +The first thing you should do when you install Git is to set your user name and email address. This is important because every Git commit uses this information, and it’s immutably baked into the commits you start creating: +``` +$ git config --global user.name "John Doe" +$ git config --global user.email johndoe@example.com +``` +Again, you need to do this only once if you pass the `--global` option, because then Git will always use that information for anything you do on that system. If you want to override this with a different name or email address for specific projects, you can run the command without the `--global` option when you’re in that project. + +Many of the GUI tools will help you do this when you first run them. +##### Your Editor + +Now that your identity is set up, you can configure the default text editor that will be used when Git needs you to type in a message. If not configured, Git uses your system’s default editor. + +If you want to use a different text editor, such as Emacs, you can do the following: +``` +$ git config --global core.editor emacs +``` +While on a Windows system, if you want to use a different text editor, such as Notepad++, you can do the following: + +On a x86 system +``` +$ git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -nosession" +``` +On a x64 system +``` +$ git config --global core.editor "'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -nosession" +``` +> Note: Vim, Emacs and Notepad++ are popular text editors often used by developers on Unix based systems like Linux and OS X or a Windows system. If you are not familiar with these editors, you may need to search for specific instructions for how to set up your favorite editor with Git. + +> Warning: You may find, if you don’t setup your editor like this, you get into a really confusing state when Git attempts to launch it. An example on a Windows system may include a prematurely terminated Git operation during a Git initiated edit. + +##### Checking Your Settings + +If you want to check your settings, you can use the `git config --list` command to list all the settings Git can find at that point: +``` +$ git config --list +user.name=John Doe +user.email=johndoe@example.com +color.status=auto +color.branch=auto +color.interactive=auto +color.diff=auto +... +``` +You may see keys more than once, because Git reads the same key from different files (`/etc/gitconfig` and `~/.gitconfig`, for example). In this case, Git uses the last value for each unique key it sees. + +You can also check what Git thinks a specific key’s value is by typing `git config `: +``` +$ git config user.name +John Doe +``` + +### 1.7 Getting Started - Getting Help +#### Getting Help + +If you ever need help while using Git, there are three ways to get the manual page (manpage) help for any of the Git commands: +``` +$ git help +$ git --help +$ man git- +``` +For example, you can get the manpage help for the config command by running +``` +$ git help config +``` +These commands are nice because you can access them anywhere, even offline. If the manpages and this book aren’t enough and you need in-person help, you can try the `#git` or `#github` channel on the Freenode IRC server (irc.freenode.net). These channels are regularly filled with hundreds of people who are all very knowledgeable about Git and are often willing to help. + +### 1.8 Getting Started - Summary +#### Summary + +You should have a basic understanding of what Git is and how it’s different from the centralized version control system you may have previously been using. You should also now have a working version of Git on your system that’s set up with your personal identity. It’s now time to learn some Git basics. diff --git a/docs/coding_style.pdf b/docs/coding_style.pdf new file mode 100644 index 0000000..d7f5fdf Binary files /dev/null and b/docs/coding_style.pdf differ diff --git a/docs/git.pptx b/docs/git.pptx new file mode 100644 index 0000000..e6aea82 Binary files /dev/null and b/docs/git.pptx differ diff --git a/images/fund.png b/images/fund.png new file mode 100644 index 0000000..184173d Binary files /dev/null and b/images/fund.png differ diff --git a/images/tloc.png b/images/tloc.png new file mode 100644 index 0000000..fef19e2 Binary files /dev/null and b/images/tloc.png differ diff --git a/img/assets/ghb/Banner.png b/img/assets/ghb/Banner.png new file mode 100644 index 0000000..e277969 Binary files /dev/null and b/img/assets/ghb/Banner.png differ diff --git a/img/assets/ghb/OneThird.jpg b/img/assets/ghb/OneThird.jpg new file mode 100644 index 0000000..741870e Binary files /dev/null and b/img/assets/ghb/OneThird.jpg differ diff --git a/img/assets/tictactoe/Banner.jpg b/img/assets/tictactoe/Banner.jpg new file mode 100644 index 0000000..10a69b9 Binary files /dev/null and b/img/assets/tictactoe/Banner.jpg differ diff --git a/img/assets/tictactoe/OneThird.jpg b/img/assets/tictactoe/OneThird.jpg new file mode 100644 index 0000000..48cd7d5 Binary files /dev/null and b/img/assets/tictactoe/OneThird.jpg differ diff --git a/img/assets/xplode/Banner.jpg b/img/assets/xplode/Banner.jpg new file mode 100644 index 0000000..a7cee8f Binary files /dev/null and b/img/assets/xplode/Banner.jpg differ diff --git a/img/assets/xplode/OneThird.jpg b/img/assets/xplode/OneThird.jpg new file mode 100644 index 0000000..56ed19c Binary files /dev/null and b/img/assets/xplode/OneThird.jpg differ diff --git a/index.html b/index.html index e901b32..27564ab 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,7 @@

    - {{ post.content }} + {% endfor %} @@ -34,4 +34,4 @@

    {% else %} Newer {% endif %} - \ No newline at end of file + diff --git a/members.md b/members.md index cc48f55..a0e6a53 100644 --- a/members.md +++ b/members.md @@ -3,12 +3,19 @@ layout: page title: Members --- +### Alumni + +* [Ayan Chandra](https://ayanc18.github.io/) + +### Fourth Year Undergraduate +* [Chinmay Rakshit](https://github.com/deathcod) + ### Third Year Undergraduate * [Rudra Nil Basu](http://rudranilbasu.github.io/) * [Amit Tiwary](https://github.com/amitiwary999) ### Second Year Undergraduate -* [Progyan Bhattacharya](https://www.linkedin.com/in/progyan-bhattacharya/) +* [Progyan Bhattacharya](http://www.codeprogyan.me) * [Biswajit Kundu](https://www.facebook.com/biswajit.kundu.29) diff --git a/projects.md b/projects.md index 9d2ea68..8d1c6b8 100644 --- a/projects.md +++ b/projects.md @@ -3,28 +3,19 @@ layout: page title: Projects --- +{% assign projects = site.assets %} -### Battery Manager +
    -A python script to notify when the battery is fully charged. - -![scr](https://raw.githubusercontent.com/BytesClub/Battery_Manager/master/branding/screenshot.png) - -[Project Link](https://github.com/BytesClub/Battery_Manager) - -**How to contribute**: Read [README](https://github.com/BytesClub/Battery_Manager/blob/master/README.md) - -**Contributors** +{% for project in projects %} + {% include browse-medium.html asset=project %} +{% endfor %} -* [Rudra Nil Basu](https://github.com/RudraNilBasu) -* [Amit Tiwary](https://github.com/amitiwary999) +
    -{% for projecs in site.project %} -

    Hello!

    - {% if projects.title != null %} - {% if projects.layout == "projects" %} -

    Hello!

    - {{ projects.title }} - {% endif %} - {% endif %} -{% endfor %} +