Skip to content

Instantly share code, notes, and snippets.

View manish-shrivastava's full-sized avatar
🎯
Transforming Tech Ideas into Reality. Call me for your work.

Manish shrivastava manish-shrivastava

🎯
Transforming Tech Ideas into Reality. Call me for your work.
View GitHub Profile
# This script is to take daily backup of mongodb
#**** Created by Manish Shrivastava ****
#=================================================
# Instead of backing up on set days this will check the time differences
# between the last backup and the time the script running.
# Useful if you're backing up irregularly on a laptop
#!/usr/local/ruby/bin/ruby -w
@manish-shrivastava
manish-shrivastava / mysql-backup-zip-and-remove-old-bkp
Created October 31, 2014 11:35
Mysql backup script take backup into compressed format and delete old backups
#This script is to take mysql backup script, take backup into compressed format and delete old backups
# Author: Manish Shrivastava
#!/bin/bash
# BEGIN CONFIGURATION ==========================================================
BACKUP_DIR="/home/whatever" # The directory in which you want backups placed
KEEP_MYSQL="14" # How many days worth of mysql dumps to keep
KEEP_SITES="2" # How many days worth of site tarballs to keep
@manish-shrivastava
manish-shrivastava / json_questions
Created December 23, 2014 10:43
ios_web_services_poc
[{
"Question": {
"QID": 1,
"Type": "multiple",
"ContentType": "multiple",
"Text": "What is best programming language?",
"OptionList": [{
"Opt": {
"Value": 1,
"OTexts": "Ruby",

Core concepts

Model

  • An object that stores data (data persistance layer abstraction).
  • Templates transforms models into HTML.
  • Same thing as Rails model.

Template

@manish-shrivastava
manish-shrivastava / frontendDevlopmentBookmarks.md
Created November 5, 2016 19:27 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.
@manish-shrivastava
manish-shrivastava / bubble_sort_in_ruby_simple_explained
Created December 8, 2020 13:21
This is a bubble sort in ruby code simple and explained here.
# A method to define the bubble sort
def bubble_sort(array)
# condition: When array has more than one element
if array.count > 1
swap = true
# Loop: Run until swap is true
while swap
swap = false
# Loop: Run loop with array counts and swap if
(array.length-1).times do |z|

Keybase proof

I hereby claim:

  • I am manish-shrivastava on github.
  • I am codebase (https://keybase.io/codebase) on keybase.
  • I have a public key ASD_CBrbJYYo3jqhUOB2PBZAmNQ2IA1iVs_iAG3yOLF_7wo

To claim this, I am signing this object: