Skip to content

Instantly share code, notes, and snippets.

View mindmergedesign's full-sized avatar

Juan Giraldo mindmergedesign

View GitHub Profile
@mindmergedesign
mindmergedesign / ajaxBearer.js
Created November 1, 2017 21:27 — forked from alikrc/ajaxBearer.js
ajax post with bearer token
$.ajax({
url: "http://localhost:33460/api/Account/userinfo",
dataType: 'json',
data: {
foo: 'bar'
},
success: function(data, status) {
return console.log("The returned data", data);
},
beforeSend: function(xhr, settings) { xhr.setRequestHeader('Authorization','Bearer ' + tokenString ); } //set tokenString before send
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@mindmergedesign
mindmergedesign / setup.md
Created October 12, 2017 18:22 — forked from shashankmehta/setup.md
Setup PHP and Composer on OSX via Brew

First install Brew on your MAC

  • Setup Brew: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • brew update
  • brew tap homebrew/dupes
  • brew tap homebrew/php
  • Install PHP 7.0.+ brew install php70
  • Install mcrypt: brew install mcrypt php70-mcrypt
  • Finally, install composer: brew install composer
@mindmergedesign
mindmergedesign / main.js
Created September 14, 2017 16:12 — forked from unr/main.js
Simplistic Axios in VueJs Example
const axiosconfig = {
baseurl: 'https://site.com/api/',
timeout: 30000,
};
import Vue from 'vue';
import axios from 'axios';
// Setting up Axios on Vue Instance, for use via this.$axios
Vue.prototype.$axios = axios.create(axiosConfig);
@mindmergedesign
mindmergedesign / country-list.html
Created September 8, 2017 18:10 — forked from yogasukma/country.html
List Of country
<option>Select Your Country</option>
<option value="Afghanistan">Afghanistan</option>
<option value="Albania">Albania</option>
<option value="Algeria">Algeria</option>
<option value="American Samoa">American Samoa</option>
<option value="Andorra">Andorra</option>
<option value="Angola">Angola</option>
<option value="Anguilla">Anguilla</option>
<option value="Antarctica">Antarctica</option>
<option value="Antigua and Barbuda">Antigua and Barbuda</option>
@mindmergedesign
mindmergedesign / us-states.html
Created September 8, 2017 18:08 — forked from pusherman/gist:3145761
HTML - Select list of US states
<select name="state" id="state">
<option value="" selected="selected">Select a State</option>
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
@mindmergedesign
mindmergedesign / stringLenght
Created May 30, 2017 13:09
Laravel 5.4: Specified key was too long error
// AppServiceProvider.php
use Illuminate\Support\Facades\Schema;
public function boot()
{
Schema::defaultStringLength(191);
}
@mindmergedesign
mindmergedesign / gist:3aa5622b1e7e74419e97eae3e0a5466b
Created May 19, 2017 18:52 — forked from jaxbot/gist:5748513
Block nginx from serving .git directories
location ~ /\.git {
deny all;
}
# or, all . directories/files in general (including .htaccess, etc)
location ~ /\. {
deny all;
}
@mindmergedesign
mindmergedesign / mailhog
Last active May 6, 2017 04:45
Install Mailhog macosx
brew update && brew install mailhog
onename