Skip to content

Instantly share code, notes, and snippets.

View bimlu's full-sized avatar
:octocat:

Robin Rawat bimlu

:octocat:
  • Dehradun, India
View GitHub Profile
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@bimlu
bimlu / Steps.md
Last active April 7, 2024 14:32
Restore SQL dumps inside docker container
  • Copy dump file from local to docker container

    docker cp dump.sql mysql-container:/home/data/sqldumps

  • Create database mydb in docker container

  • Start terminal session on container

    docker exec -it mysql-container bash

  • Restore dump inside docker container

@bimlu
bimlu / countries.sql
Created January 2, 2024 17:00 — forked from adhipg/countries.sql
Sql dump of all the Countries, Country Codes, Phone codes.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@bimlu
bimlu / .gitconfig
Created September 10, 2022 00:42 — forked from digitaljhelms/.gitconfig
My personal ~/.gitconfig file
[user]
name = Jeremy Helms
email = [email protected]
[alias]
aliases = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /' | sort # list all aliases
cb = !git branch | grep ^* | cut -d' ' -f2
branch-name = !git cb # alias to "cb" alias
st = status
ci = commit
cie = commit --allow-empty-message -m ''
@bimlu
bimlu / .gitconfig
Created September 10, 2022 00:33 — forked from rallygroup/.gitconfig
Sample Git Config file
[user]
name = Your Name
email = [email protected]
[color]
diff = auto
status = auto
branch = auto
interactive = auto
ui = true
pager = true
@bimlu
bimlu / config
Created September 2, 2022 15:44 — forked from cedced19/config
Install i3 after install Fedora Gnome
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@bimlu
bimlu / .vimrc
Created August 16, 2022 05:04 — forked from simonista/.vimrc
A basic .vimrc file that will serve as a good template on which to build.
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on
const validChars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$&*.'.split('')
const randomChar = () => validChars[Math.floor(Math.random() * validChars.length)]
const generateRandomPassword = (length) => {
let password = ''
for (let i = 0; i < length; i++) {
password += randomChar()
}
return password
@bimlu
bimlu / ScrollManager.jsx
Created April 11, 2021 05:46 — forked from jeffijoe/ScrollManager.jsx
Save and restore scroll position in React
/*
The MIT License
Copyright (c) Jeff Hansen 2018 to present.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION W
#!/usr/bin/env bash
echo "
----------------------
NODE & NPM
----------------------
"
# add nodejs 14 ppa (personal package archive) from nodesource
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -