Skip to content

Instantly share code, notes, and snippets.

View chandan2495's full-sized avatar
🎯
Focusing

Chandan Singh chandan2495

🎯
Focusing
View GitHub Profile
@chandan2495
chandan2495 / readme.md
Last active November 4, 2020 11:34 — forked from troyfontaine/readme.md
Resize root partition (or how to remove the default /home partition) on CentOS 7 online

Resize root partition (or how to remove the default /home partition) on CentOS 7 online

This requires you to be able to ssh into the instance using the root user account and that no services be running as users out of /home on the target machine.

The examples are from a default installation with no customation-you NEED to know what you're working with for volumes/partitions to not horribly break things.

By default, CentOS 7 uses XFS for the file system and Logical Volume Manager (LVM), creating 3 partitions: /,/home and

Step 1 - Copy /home Contents (No need if you don't have any data there)

To backup the contents of /home, do the following:

@chandan2495
chandan2495 / The Technical Interview Cheat Sheet.md
Created March 7, 2017 13:57 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@chandan2495
chandan2495 / colores.js
Created May 12, 2016 06:19 — forked from aaizemberg/colores.js
categorical colors
// colores usados por Google en sus graficos, trends, etc.
//
function colores_google(n) {
var colores_g = ["#3366cc", "#dc3912", "#ff9900", "#109618", "#990099", "#0099c6", "#dd4477", "#66aa00", "#b82e2e", "#316395", "#994499", "#22aa99", "#aaaa11", "#6633cc", "#e67300", "#8b0707", "#651067", "#329262", "#5574a6", "#3b3eac"];
return colores_g[n % colores_g.length];
}
//
//
var c10 = d3.scale.category10();
// Highcharts CheatSheet Part 1.
// Create interactive charts easily for your web projects.
// Download: http://www.highcharts.com/download
// More: http://api.highcharts.com/highcharts
// 1. Installation.
// Highcharts requires two files to run, highcharts.js and either jQuery, MooTools or Prototype or the Highcharts Standalone Framework which are used for some common JavaScript tasks.
// <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
// <script src="https://code.highcharts.com/highcharts.js"></script>
@chandan2495
chandan2495 / fantasia.py
Created February 29, 2016 07:39
Shuffling music player using Python and mpg123.
import os
import random
import subprocess
def get_files(root):
files = []
def scan_dir(dir):
for f in os.listdir(dir):
f = os.path.join(dir, f)