Skip to content

Instantly share code, notes, and snippets.

View Mukesh23singh's full-sized avatar

Mukesh Singh Mukesh23singh

  • Citiustech healthcare technology private limited
  • Mumbai
View GitHub Profile

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

Rails Generating & Scaffolding

Rails' use of strict naming conventions means a lot of core code SHOULD be in the same format whoever writes it? It could be written by a friend, colleague or a computer... it shouldn't matter because the same Rails rules apply to everyone.

This means that Rails can actually do some tasks for you! It can actually build things and write code on your behalf...

Coming from another language like PHP, this can seem like magic.

@Mukesh23singh
Mukesh23singh / Profile.ps1
Created February 22, 2023 03:37
PowerShell Profile.ps1
# ___ ______ ____
# / _ \___ _ _____ ____/ __/ / ___ / / /
# / ___/ _ \ |/|/ / -_) __/\ \/ _ \/ -_) / /
# /_/ \___/__,__/\__/_/ /___/_//_/\__/_/_/
#
# https://github.com/PowerShell/PowerShell
# %USERPROFILE%\Documents\PowerShell\Profile.ps1

youtube-dl

youtube-dl is an opensource command line tool to download video or audio from online video streaming services.

Videos downloaded in mkv or webm extensions can be played by VLC Media player in all major devices and operating systems including iPhone, Android devices.

Tool website: https://youtube-dl.org/

This gist shows the example commands to use the tool and doesn't support or encourage piracy or violation of copyrights of the online streaming service or the author of the content

Installing youtube-dl:

@Mukesh23singh
Mukesh23singh / youtube-dl.md
Created January 24, 2023 06:29 — forked from protrolium/youtube-dl.md
youtube-dl syntax

youtube-dl will output in the current directory

To list available formats

youtube-dl --list-formats URL

To download an entire user/channel

youtube-dl -citw ytuser:<USER> or

@Mukesh23singh
Mukesh23singh / ffmpeg.md
Created June 6, 2022 15:00 — forked from liangfu/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

@Mukesh23singh
Mukesh23singh / gist:09903c88ca5d782f5ec474384a5e4618
Created September 15, 2021 12:47 — forked from ryansobol/gist:5252653
15 Questions to Ask During a Ruby Interview

Originally published in June 2008

When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.

To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.

What to expect

Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.

@Mukesh23singh
Mukesh23singh / code-stack.ts
Last active April 12, 2021 09:18 — forked from sebsto/code-stack.ts
CDK Create EC2 instace in private subnet. Install Nginx.
import ec2 = require('@aws-cdk/aws-ec2');
import cdk = require('@aws-cdk/core');
import { Fn, Tag, Resource } from '@aws-cdk/core';
import { AmazonLinuxImage, UserData, InstanceType } from '@aws-cdk/aws-ec2';
import { Role, ServicePrincipal, ManagedPolicy, CfnInstanceProfile } from '@aws-cdk/aws-iam'
/**
* Create my own Ec2 resource and Ec2 props as these are not yet defined in CDK
* These classes abstract low level details from CloudFormation
@Mukesh23singh
Mukesh23singh / docker-help.md
Last active March 31, 2021 07:13 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@Mukesh23singh
Mukesh23singh / template.rb
Created November 1, 2020 11:09 — forked from mmuenster/template.rb
Rails New app template file
# create rvmrc file
create_file ".rvmrc", "rvm gemset use #{app_name}"
gem "haml-rails"
gem "sass"
# hpricot and ruby_parser required by haml
gem "hpricot", :group => :development
gem "ruby_parser", :group => :development
gem "nifty-generators"
gem "simple_form"