Skip to content

Instantly share code, notes, and snippets.

@weger
weger / $http_post_formdata.js
Last active September 6, 2016 09:24
$http使用x-www-form-urlencoded提交参数到服务端
// http://victorblog.com/2012/12/20/make-angularjs-http-service-behave-like-jquery-ajax/
angular.module('MyModule', [])
.run(['$httpProvider', function($httpProvider) {
// Use x-www-form-urlencoded Content-Type
$httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8';
/**
* The workhorse; converts an object to x-www-form-urlencoded serialization.
* @param {Object} obj
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then