##laravel
logging in laravel
tail -n0 -F storage/logs/laravel.log
add use Log;
above the class then use Log::info('check this var =' . $var);
install laravel
composer create-project laravel/laravel laravelapp
import { DomSanitizer } from '@angular/platform-browser'; | |
import { Pipe, PipeTransform } from '@angular/core'; | |
import { icons } from 'feather-icons'; // v4+ | |
@Pipe({ name: 'feather' }) | |
export class FeatherIconsPipe implements PipeTransform { | |
constructor(private sanitizer: DomSanitizer) {} |
##laravel
logging in laravel
tail -n0 -F storage/logs/laravel.log
add use Log;
above the class then use Log::info('check this var =' . $var);
install laravel
composer create-project laravel/laravel laravelapp
const express = require('express'); | |
const cons = require('consolidate'); | |
const bodyParser = require('body-parser'); | |
const cookieParser = require('cookie-parser'); | |
const session = require('express-session'); | |
const passport = require('passport'); | |
const FacebookStrategy = require('passport-facebook').Strategy; | |
const LocalStrategy = require('passport-local').Strategy; | |
const ensureLoggedIn = require('connect-ensure-login').ensureLoggedIn; |
ERROR: java.sql.SQLException: The server time zone value 'EEST' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support. | |
SOLVE: | |
1. sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf | |
2. add after line [mysqld] | |
default_time_zone='+03:00' | |
3. ctrl+o | |
4. ctrl+x | |
5. sudo service mysql restart |
public class AjaxAwareAuthenticationEntryPoint extends LoginUrlAuthenticationEntryPoint { | |
public AjaxAwareAuthenticationEntryPoint(String loginFormUrl) { | |
super(loginFormUrl); | |
} | |
@Override | |
public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException { | |
String ajaxHeader = ((HttpServletRequest) request).getHeader("X-Requested-With"); | |
if ("XMLHttpRequest".equals(ajaxHeader)) { | |
response.sendError(HttpServletResponse.SC_FORBIDDEN, "Ajax Request Denied (Session Expired)"); |
[ | |
{ | |
"symbol": "$", | |
"name": "US Dollar", | |
"symbol_native": "$", | |
"decimal_digits": 2, | |
"rounding": 0, | |
"code": "USD", | |
"name_plural": "US dollars" | |
}, |
# copied from default config | |
user nginx; | |
worker_processes 1; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} |
{ | |
"U2": "easyjet", | |
"1T": "Bulgarian Air Charter", | |
"Q5": "40-Mile Air", | |
"4O": "Interjet", | |
"7A": "Express Air Cargo", | |
"JY": "Air Turks and Caicos", | |
"JU": "Air Serbia", | |
"QH": "Kyrgyzstan", | |
"A8": "Benin Golf Air", |
package com.gabrielbauman.gist; | |
import java.util.regex.Pattern; | |
public enum CardType { | |
UNKNOWN, | |
VISA("^4[0-9]{12}(?:[0-9]{3}){0,2}$"), | |
MASTERCARD("^(?:5[1-5]|2(?!2([01]|20)|7(2[1-9]|3))[2-7])\\d{14}$"), | |
AMERICAN_EXPRESS("^3[47][0-9]{13}$"), |