Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Finalizing

Juyal Ahmed tojibon

:octocat:
Finalizing
View GitHub Profile
@tojibon
tojibon / mysql.md
Last active May 9, 2019
Search for a specific column name in all the tables in MySQL database?
View mysql.md
SELECT    
    table_name, 
    ordinal_position    
FROM INFORMATION_SCHEMA.COLUMNS    
WHERE    
    table_schema = 'DB_NAME' AND    
    column_name='column_name';
@tojibon
tojibon / composer.json
Last active May 8, 2019
Creating a package with Laravel 5.6 for a printing company ex: Alpha and the package name ex: Library.
View composer.json
{
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/",
"Alpha\\Library\\": "packages/Library/src/"
}
@tojibon
tojibon / readme.md
Created Sep 11, 2018
GIT Ignoring last few commits and roll back to existing target commit
View readme.md
git reset --hard 2467b9ebcc4f2487b4da5c9070e92913dc219842
git rebase -i master
git add .
git commit -m "reverted to 2467b9"
git push -f origin master
@tojibon
tojibon / readme.md
Created Aug 30, 2018
Multi Account Git
View readme.md
ssh-keygen -t rsa
ssh-add ~/.ssh/id_rsa

ssh-keygen -t rsa -C "companyName" -f "companyName"
ssh-add ~/.ssh/companyName
nano ~/.ssh/config
@tojibon
tojibon / gitflow-breakdown.md
Created Apr 1, 2019 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.
View gitflow-breakdown.md

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@tojibon
tojibon / readme.md
Last active Apr 27, 2019
Setting up VirtualHost for Symfony App in Ubuntu
View readme.md
sudo vim /etc/apache2/sites-available/symfony-test-app.conf
<VirtualHost *:80>
  ServerName symfony-test-app.com
  <IfModule mod_rewrite.c>
    RewriteEngine on
@tojibon
tojibon / Application.js
Created Sep 29, 2016
Summernote image upload and save on server instead of base64 data saving on Database.
View Application.js
Application.prototype.initSummerNoteJS = function() {
var $this = this;
$('#description').summernote({
height: 300, //set editable area's height
onImageUpload: function(files, editor, $editable) {
$this.sendFile(files[0],editor,$editable);
}
});
}
@tojibon
tojibon / api.php
Last active Apr 17, 2019
Laravel fire an Artisan command from an HTTP route by using Artisan facade
View api.php
<?php
Route::get('/foo', function()
{
$exitCode = Artisan::call('command:name', ['--option' => 'foo']);
//
});
?>
@tojibon
tojibon / bash.md
Created Apr 12, 2019
Installing symfony client
View bash.md
wget https://get.symfony.com/cli/installer -O - | bash
export PATH="$HOME/.symfony/bin:$PATH"
sudo mv /home/juyal/.symfony/bin/symfony /usr/local/bin/symfony
@tojibon
tojibon / install.md
Last active Mar 20, 2019
Some common installation task for Linux after installing OS
View install.md
sudo apt-get install -y build-essential
sudo apt-get install curl -y
sudo apt-get install libpng-dev libjpeg-dev -y
sudo apt-get install pngquant -y
sudo apt-get install git -y
sudo apt-get install openssh-server -y
sudo apt-get install unrar -y
# Fix local issue: https://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue