Skip to content

Instantly share code, notes, and snippets.

View Chell0's full-sized avatar
👨‍💻
Just Coding

Machel Odhiambo Chell0

👨‍💻
Just Coding
View GitHub Profile
@Chell0
Chell0 / CollectionExtension.cs
Last active May 27, 2020 22:42
ToObservableCollection
using System.Collections.Generic;
public static class CollectionExtensions
{
public static ObservableCollection<T> ToObservableCollection<T>(this IEnumerable<T> list)
{
var collection = new ObservableCollection<T>();
foreach (var item in list)
{
@Chell0
Chell0 / solution.js
Created February 12, 2019 11:21
Even or Odd
/*
Create a function (or write a script in Shell) that takes an integer as an argument and returns "Even" for even numbers or "Odd" for odd numbers.
*/
function even_or_odd(number) {
// Check whether it is even or odd
if (number % 2 == 0) {
return "Even";
} else {
return "Odd";
@Chell0
Chell0 / license-badges.md
Created October 10, 2018 15:25 — forked from lukas-h/license-badges.md
License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • Badges are made with Shields.io.
  • This badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.  
  • 🇫🇷 Cette liste en français
  • Github has a new autodetection of the LICENSE file, which shows up the license at the repo overview
@Chell0
Chell0 / intermediateCommands.md
Last active July 17, 2018 20:58
Advanced Linux Commands

Intermediate Terminal Commands

  • echo - used to add text to a new file or even an existing file.
  • cat - used to display the contents of a file and also easily view programs.
  • gedit, nano, vi and jed - are all text editors you can use from the terminal to edit files, add text to files etc.
  • Ctrl+X - used to save your files after editing them from the terminal.
  • sudo - stands for SuperUser Do.
  • df - to shows the available disk space in every partition in your system.
  • df -m -show the available disk space in megabytes.
  • du -shows disk usage of a certain file/folder in your system.
@Chell0
Chell0 / BasicCommands.md
Last active July 17, 2018 20:39
Linux Commands

Basic Terminal Commands

  1. Ctrl+Alt+T - to launch the terminal in Ubuntu.
  2. pwd - to know which directory you are in.
  3. / - this forward slash represents the root.
  4. ls - to list all the files in the current directory.
  5. ls -a - list all files plus hidden ones in that specific directory.
  6. cd - change directory. Something like "cd /Documents/Books" which takes you to the Books directory.
  7. mkdir - creates a new folder or a directory in any location you want. Something like 'mkdir Books' and a new directory called books.
  8. rmdir - deletes an empty directory.
@Chell0
Chell0 / Notes.txt
Created July 8, 2018 15:02
What is MongoDB?
It is a NoSQL database.
It uses a JSON(JavaScript Object Notation) like syntax.
One of the huge advantages is that it uses scaling which is easy compared to SQL and relational databases.
It is much faster in most type of operations