Skip to content

Instantly share code, notes, and snippets.

View auxcoder's full-sized avatar
🗼
Working from home

AuxCoder auxcoder

🗼
Working from home
View GitHub Profile
@auxcoder
auxcoder / index.config.js
Created January 10, 2016 23:58
Transform an object to x-www-form-urlencoded serialization
angular.module('engageAngularApp')
.config(transformRequest)
/** @ngInject */
function transformRequest($httpProvider) {
// Enable cross domain calls
// $httpProvider.defaults.useXDomain = true;
// Remove the header used to identify ajax call that would prevent CORS from working
// delete $httpProvider.defaults.headers.common['X-Requested-With'];
@auxcoder
auxcoder / google-autocomplete-directive.js
Created January 10, 2016 20:04
Google Autocomplete Address Places
(function() {
'use strict';
angular
.module('myApp')
.directive('googlePlaces', googlePlaces);
/** @ngInject */
function googlePlaces(){
return {
@auxcoder
auxcoder / app.js
Created January 4, 2016 03:24 — forked from victorb/app.js
Easy AngularJS Directive for Google Places Autocomplete
var myApp = angular.module('myApp', []);
myApp.directive('googleplace', function() {
return {
require: 'ngModel',
link: function(scope, element, attrs, model) {
var options = {
types: [],
componentRestrictions: {}
};
@auxcoder
auxcoder / regex.md
Last active August 20, 2018 21:20 — forked from nerdsrescueme/regex.txt
Common Regex

Javascript Regex

Remove html tags

var regex = /(<([^>]+)>)/ig;
var htmlContent = "<p>test</p>";
var result = htmlContent.replace(regex, "");

console.log(result);