Skip to content

Instantly share code, notes, and snippets.

DISK USAGE
df -h # Show free and used space on mounted filesystems
df -i # Show free and used inodes on mounted filesystems
fdisk -l # Display disks partitions sizes and types
du -ah # Display disk usage for all files and directories in human readable format
du -sh or du -hs # Display total disk usage off the current directory
du -hs * | sort -h # Sort du -h output by size
FILE AND DIRECTORY COMMANDS
ls -al # List all files in a long listing (detailed) format
function find_lis(){
var nums_str = document.getElementById('sequence_box').value;
var nums_temp = nums_str.split(',');
/* do not want to use the zero index. */
nums_temp.unshift(0);
/* Bootstrap 4 - https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css */
.active
.alert
.alert-danger
.alert-dark
.alert-dismissible
.alert-heading
.alert-info
.alert-light
@DavidDexterCharles
DavidDexterCharles / README-Template.md
Created July 12, 2017 13:56 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

// Node.js CheatSheet.
// Download the Node.js source code or a pre-built installer for your platform, and start developing today.
// Download: http://nodejs.org/download/
// More: http://nodejs.org/api/all.html
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@DavidDexterCharles
DavidDexterCharles / frontendDevlopmentBookmarks.md
Created December 15, 2016 13:36 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.
void addone(int n, int B[])
{
int i=n;
while(i>=1 && B[i]==1){
B[i]=0;
i--;
}
if(i>=1)
B[i]=1;
}//This is for when most significant bit in B[1] and least significant bit in B[n]
/* December 2005 Question 3 */
/* (b) In a treasure hunt, a retangular field is divided into m rows and n */
/* columns. Starting from a square in the left column, a player must move */
/* to a square in the right column, collectine 'treasure' as he moves from*/
/* square to square. At each step, a player can move diagonally to: */
/* the square to his left in the next column provided he is not */
/* already in the top row */
/* or to his right in the next column, provided he is not already in */
/* the bottom row. */
/* */
@DavidDexterCharles
DavidDexterCharles / MagicSquare.java
Created December 8, 2016 18:20 — forked from uugan/MagicSquare.java
Shows Magic square by odd, doubly even & singly even numbers
/*************************************************************************
*
* This code generates a magic square for odd or even number.
* Based on methods :
* http://www.1728.org/magicsq1.htm - odd
* http://www.1728.org/magicsq2.htm - doublyEven
* http://www.1728.org/magicsq3.htm - singlyEven
* code by : uugan
* date : 01.06.2013
* Compilation: javac MagicSquare.java
@DavidDexterCharles
DavidDexterCharles / posgres-in-c9.md
Created December 2, 2016 12:58 — forked from mikeumus/posgres-in-c9.md
PostgreSQL in Cloud9 IDE
Gist shortlink: https://git.io/vV0xB

Official Living Doc for Postgres in C9: https://community.c9.io/t/setting-up-postgresql/1573

@mikeumus' Postgres in Cloud9 Notes: