Skip to content

Instantly share code, notes, and snippets.

View mihir-kumar-thakur's full-sized avatar

Mihir Kumar Thakur mihir-kumar-thakur

View GitHub Profile
@mihir-kumar-thakur
mihir-kumar-thakur / bootstrap-5-integration-with-rails-6.1.md
Last active May 8, 2021 05:02
Bootstrap 5 Integration with rails 6.1

Install following packages with yarn

yarn add bootstrap
yarn add @popperjs/core

Next, we need to import bootstraps to our application.js

import "bootstrap"
import "../stylesheets/application"
@mihir-kumar-thakur
mihir-kumar-thakur / sphinx-binary-installation.md
Last active June 1, 2021 15:33
Sphinx search 3 installation with binary on Ubuntu for working with Thinking sphinx gem on ruby on rails

Sphinx search 3 installation with binary on Ubuntu for working with Thinking sphinx gem on ruby on rails

Download sphinx with curl

curl http://sphinxsearch.com/files/sphinx-3.3.1-b72d67b-linux-amd64.tar.gz -o sphinx.tar.gz

Unzip downloaded zip file

@mihir-kumar-thakur
mihir-kumar-thakur / disable-keyboard-on-boot-ubuntu
Last active March 2, 2024 08:05
disable-keyboard-on-boot-ubuntu
Disable Laptop Keyboard in Ubuntu
Taken From :- https://blog.hostonnet.com/laptop-keyboard-ubuntu
To disable laptop built in keyboard in Ubuntu, first you need to identify the device id for keyboard.
Now run xinput –list command to get list of all input devices
hostonnet@pc4:~$ xinput --list
⎡ Virtual core pointer id=2 [master pointer (3)]
@mihir-kumar-thakur
mihir-kumar-thakur / enable-mouse-button
Created June 8, 2020 04:39
Ubutnu 20.04 Mouse Button Stopped Working
sudo rmmod psmouse && sudo modprobe psmouse proto=imps
https://bugzilla.redhat.com/show_bug.cgi?id=1515974
["{\"twitter\":\"katyperry\",\"domain\":\"katyperry.com\",\"name\":\"KATY PERRY\",\"type\":\"celebrity\",\"twitter_user_id\":21447363}", "{\"twitter\":\"justinbieber\",\"domain\":\"smarturl.it\",\"name\":\"Justin Bieber\",\"type\":\"celebrity\",\"twitter_user_id\":27260086}", "{\"twitter\":\"taylorswift13\",\"domain\":\"grmypro.co\",\"name\":\"Taylor Swift\",\"type\":\"celebrity\",\"twitter_user_id\":17919972}", "{\"twitter\":\"rihanna\",\"domain\":\"rihannanow.com\",\"name\":\"Rihanna\",\"type\":\"celebrity\",\"twitter_user_id\":79293791}", "{\"twitter\":\"ladygaga\",\"domain\":null,\"name\":\"The Countess\",\"type\":\"celebrity\",\"twitter_user_id\":14230524}", "{\"twitter\":\"jtimberlake\",\"domain\":\"justintimberlake.com\",\"name\":\"Justin Timberlake\",\"type\":\"celebrity\",\"twitter_user_id\":26565946}", "{\"twitter\":\"TheEllenShow\",\"domain\":\"ellentube.com\",\"name\":\"Ellen DeGeneres\",\"type\":\"celebrity\",\"twitter_user_id\":15846407}", "{\"twitter\":\"britneyspears\",\"domain\":\"britney.lk\
@mihir-kumar-thakur
mihir-kumar-thakur / Anaconda.sublime-settings
Last active March 19, 2020 06:52
Sublime Text Settings
/*
Anaconda default settings
*/
{
/*
Anaconda Tooltip Options
Sublime Text 3 supports tooltips since build 3070; if anaconda
runs in a ST3 installation equal to or newer than build 3070, it
can be configured to show tooltips for documentation and signatures.
@mihir-kumar-thakur
mihir-kumar-thakur / web-servers.md
Created January 18, 2020 08:16 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">

The single most useful thing in bash SHELL CLI UNIX BASH Create ~/.inputrc and fill it with this:

"\e[A": history-search-backward "\e[B": history-search-forward This allows you to search through your history using the up and down arrows … i.e. type "cd" and press the up arrow and you'll search through everything in your history that starts with "cd".

It's a little bit like ctrl-r (mentioned in many of the comments below), but anchored to the start of the line, and the arrow keys allow you to scroll back and forth between matches.

sudo apt install curl
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install git-core zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev nodejs yarn
cd
git clone https://github.com/rbenv/rbenv.git ~/.rbenv