Skip to content

Instantly share code, notes, and snippets.

@edyonil
edyonil / iterm2-solarized.md
Created June 6, 2020 01:16 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@edyonil
edyonil / media-query.css
Created January 9, 2019 14:11 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@edyonil
edyonil / gulpfile.js
Created March 15, 2016 01:09 — forked from edouard-lopez/gulpfile.js
Gulp copy font-awesome files to dist/ directory
'use strict';
// Generated on 2014-04-14 using generator-leaflet 0.0.14
var gulp = require('gulp');
var open = require('open');
var wiredep = require('wiredep').stream;
// Load plugins
var $ = require('gulp-load-plugins')();
@edyonil
edyonil / auth.markdown
Last active August 29, 2015 14:06 — forked from mlynch/auth.markdown

Single Page Apps are ruling the world and AngularJS is leading the charge. But many of the lessons we learned in the Web 2.0 era no longer apply, and few are as drastically different as authentication.

CORS

CORS is an oft-misunderstood feature of new browsers that is configured by a remote server. CORS stands for Cross-Origin-Resource-Sharing, and was designed to make it possible to access services outside of the current origin (or domain) of the current page.

Like many browser features, CORS works because we all agree that it works. So all major browsers like Chrome, Firefox, and IE support and enforce it. By using these browsers, you benefit from the security of CORS.

That means certain browsers do not enforce it, so it is not relevant there. One large example is a native Web View for things like Cordova and Phonegap. However, these tools often have configuration options for whitelisting domains so you can add some security that way.

<?php
### --- Snip --- ###
App::after(function($request, $response)
{
// HTML Minification
if(App::Environment() != 'local')
{
if($response instanceof Illuminate\Http\Response)
<!DOCTYPE html>
<html>
<head>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script class="jsbin" src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.min.js" type="text/javascript"></script>
<script src="jquery.validate.cpf.js"></script>
<script type="text/javascript">
$(function () {
var $cpf = $("#id_cpf").attr("name");
var $params = {debug:false, rules:{}, messages:{}};