Skip to content

Instantly share code, notes, and snippets.

@homerjam
homerjam / mdChipDraggable.js
Last active September 14, 2021 11:06
Angular Material draggable chips directive
angular.module('mdChipDraggable', [])
.directive('mdChipDraggable', function () {
return {
restrict: 'A',
scope: {},
bindToController: true,
controllerAs: 'vm',
controller: ['$document', '$scope', '$element', '$timeout',
function ($document, $scope, $element, $timeout) {
var vm = this;
@homerjam
homerjam / gist:394a3ba39e8848051195
Created May 14, 2015 14:48
Redirect old domain to new domain via proxy
# .htaccess for old domain
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP:X-FORWARDED-HOST} !(.*)newdomain(.*) [NC]
RewriteRule (.*) http://newdomain.com/$1 [R=301,L]
# .htaccess for new domain
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://olddomain.com/$1 [P,L]