SELECT
table_name,
ordinal_position
FROM INFORMATION_SCHEMA.COLUMNS
WHERE
table_schema = 'DB_NAME' AND
column_name='column_name';
View mysql.md
View composer.json
{ | |
"autoload": { | |
"classmap": [ | |
"database/seeds", | |
"database/factories" | |
], | |
"psr-4": { | |
"App\\": "app/", | |
"Alpha\\Library\\": "packages/Library/src/" | |
} |
View readme.md
git reset --hard 2467b9ebcc4f2487b4da5c9070e92913dc219842
git rebase -i master
git add .
git commit -m "reverted to 2467b9"
git push -f origin master
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
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
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
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); | |
} | |
}); | |
} |
View api.php
<?php | |
Route::get('/foo', function() | |
{ | |
$exitCode = Artisan::call('command:name', ['--option' => 'foo']); | |
// | |
}); | |
?> |
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
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