Skip to content

Instantly share code, notes, and snippets.

View codenannu's full-sized avatar

Nand kishor Shukla codenannu

  • Sangam Vihar, Delhi
View GitHub Profile
@codenannu
codenannu / broken_pipe_issue.sh
Last active August 8, 2019 05:07
Broken Pipe Issue : Git
## after clonning git, when we go for push, issue occur : Broken pipe
## we can resolve this by using below comman
git remote set-url origin <PASTE GIT URL HERE>
@codenannu
codenannu / get_system_config.sh
Last active August 8, 2019 05:07
Get System Configuration
## get url, to check system configuration
https://jsonip.com/
## get all system configuration
http://14.143.254.58/index.json?t=1563949273618
@codenannu
codenannu / install_apache_php_command.sh
Last active March 15, 2023 08:50
Install Apache2, MySql & PHP in Ubuntu
## install php
sudo apt update
sudo apt-get install apache2
## start & enable apache2
sudo systemctl start apache2
sudo systemctl enable apache2
## install php
sudo apt-get install software-properties-common python-software-properties
@codenannu
codenannu / useful-links.sh
Last active August 8, 2019 07:26
Useful Links
@codenannu
codenannu / install-database-connection-manager.sh
Last active March 11, 2019 06:53
Node+Express+Sequelize Useful Commands
# mysql
npm install --save mysql2
# install sequelize package for db connection
npm install sequelize --save
npm install sequelize-cli --save
@codenannu
codenannu / php-brcypt-salt.php
Last active November 23, 2018 10:22 — forked from Greg-Boggs/php-brcypt-salt.php
Brcypt Salt In PHP
-----------------------------------------------
-- Create a mySQL table to hold hashed passwords and random salt
-- SQL create script for for table `users`
-----------------------------------------------
CREATE TABLE IF NOT EXISTS `users` (
`user_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`email` varchar(30) NOT NULL,
`reg_date` date NOT NULL,
`fname` varchar(20) DEFAULT NULL,
@codenannu
codenannu / bcrypt.php
Last active January 18, 2019 11:05 — forked from dzuelke/bcrypt.php
How to use bcrypt in PHP to safely store passwords (PHP 5.3+ only)
<?php
// secure hashing of passwords using bcrypt, needs PHP 5.3+
// see http://codahale.com/how-to-safely-store-a-password/
// salt for bcrypt needs to be 22 base64 characters (but just [./0-9A-Za-z]), see http://php.net/crypt
$salt = substr(strtr(base64_encode(openssl_random_pseudo_bytes(22)), '+', '.'), 0, 22);
// 2y is the bcrypt algorithm selector, see http://php.net/crypt
// 12 is the workload factor (around 300ms on my Core i7 machine), see http://php.net/crypt
$hash = crypt('foo', '$2y$12$' . $salt);
@codenannu
codenannu / jFontsize.js
Last active January 18, 2019 11:08
jFontsize JS Library
----------------------------------------------------
-- jFontSize is an easy-to-use jQuery Plugin that adds A+ and A- buttons to your website, which alter the font size on sites with lager texts to improve user experience.
--------------------------------------------------
--------
* URL
--------------
http://jfontsize.com/ OR
http://www.jstorage.info
@codenannu
codenannu / steps_to_pushCode_on_gitlab.sh
Last active January 18, 2019 11:10
Steps to push code on gitlab
## Create public key, if dont have
# Follow below steps on terminal,
1. ssh-keygen -t rsa -b 4096
2. cat ~/.ssh/id_rsa.pub
#(Add public-ket to your gitlab account > ssh section)
3. ssh-add
## Now, Go in Root folder
# Create `.gitignore` file,: contain list of files that should not move on gitlab.
# Follow below steps on terminal,
@codenannu
codenannu / docker-compose.yml
Last active January 18, 2019 11:16
docker-codeigniter
version: '2'
services:
### Workspace Utilities Container ###########################
workspace:
build:
context: ./workspace
args: