See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
package main | |
import ( | |
"errors" | |
"fmt" | |
"io/ioutil" | |
"os" | |
"path" | |
) |
[ | |
{ | |
"code": "AD", | |
"emoji": "🇦🇩", | |
"unicode": "U+1F1E6 U+1F1E9", | |
"name": "Andorra", | |
"title": "flag for Andorra", | |
"dialCode": "+376" | |
}, | |
{ |
// don't forget to install "lodash" "dotenv" | |
var ionicWebpackConfig = require('@ionic/app-scripts/config/webpack.config.js'); | |
var webpack = require('webpack'); | |
var _ = require('lodash'); | |
var dotenvConfig = require('dotenv').config(); | |
var dev = ionicWebpackConfig.dev; | |
var prod = ionicWebpackConfig.prod; | |
var loadProcessEnvValues = function() { |
var gulp = require('gulp'), | |
sass = require('gulp-sass'); | |
var sassConfig = { | |
inputDirectory: 'resources/sass/**/*.scss', | |
outputDirectory: 'assets/css', | |
options: { | |
outputStyle: 'expanded' | |
} | |
} |
# This file is for unifying the coding style for different editors and IDEs | |
# editorconfig.org | |
# WordPress Coding Standards | |
# https://make.wordpress.org/core/handbook/coding-standards/ | |
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf |
/** | |
* Source: https://monocleglobe.wordpress.com/2010/01/12/everybody-needs-a-little-printf-in-their-javascript/ | |
* | |
* Example: | |
* "{f} {b}".printf({f: "foo", b: "bar"}); | |
* | |
* "%s %s".printf(["foo", "bar"]); | |
* | |
* "%s %s".printf("foo", "bar"); | |
* |
$(document).ajaxError(function(event, xhr, settings) { | |
if (! settings.globalRequest) return; | |
var response = xhr.responseJSON; | |
switch (xhr.status) { | |
case 422: | |
$.each(response.error, function(key, errors) { | |
var input = $('[name="'+ key +'"]'); | |
var wrapper = input.parents('.form-group, label'); |
/********************************** | |
-------------------- | |
Sample Request | |
-------------------- | |
$.ajax({ | |
wrapperElement: $('form#wrapperElementClassOrId'), | |
url: url, | |
type: 'POST', |
$('[data-sortable]').sortable({ | |
axis: 'y', | |
update: function(event, ui) { | |
var data = { | |
model: $(this).data('model'), | |
sort: $(this).sortable('toArray') | |
} | |
$.ajax({ | |
type: 'POST', |