Skip to content

Instantly share code, notes, and snippets.

git乱码解决方案汇总 http://zengrong.net/post/1249.htm
本站原创文章,转载请注明: 转载自zrong's Blog,原文 git乱码解决方案汇总,欢迎使用文章源码进行转载。
本站转载文章会标明[转],转载请注明原始作者文章地址。
我一直是在cygwin下使用git,辅以TortoiseGit。使用上没什么问题,但今天在处理一个有中文文件名的项目时却出现文件名乱码的问题。
情况是这样的:
在一个使用cygwin的bash提交的git项目中,已经完成了所有的提交,但使用TortoiseGit查看的时候,却发现仍有文件没有提交,甚至是有文件还处于未暂存的状态。于是使用TortoiseGit提交;
@youzipi
youzipi / service.java
Created July 23, 2016 05:53
service findPageBeanByForm
/**
* 按经销商id+[分页]查询
*
* @return
*/
@Override
public Pageable<LicenseVo> findByForm(LicenseForm form) {
BrandLicenseCustomerExample example = form2example(form);
@youzipi
youzipi / 0_reuse_code.js
Created July 23, 2016 05:55
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@youzipi
youzipi / chain.js
Last active March 23, 2017 07:27
lodash-bala
var areas = _.chain(nodes)
.filter(function (node) {
switch (node.id[0]) {
case 'p': // 省 是全选状态
return isFullCheck(node);
case 'c': // 市 是全选状态 and 上级(省)是半选
return isFullCheck(node)
&& !isFullCheck(node.getParentNode());
case 'd': // 区县 是全选状态 and 上级(市)是半选
return !isFullCheck(node.getParentNode());
@youzipi
youzipi / set_column_by_column.sql
Last active August 3, 2016 02:57
基于表A的a字段,生成其他字段
update np_manager mm
left join
( SELECT
left(m.location_id, 2) * pow(10, 10) AS province_id,
(CASE WHEN m.type >= '2'
THEN left(m.location_id, 4) * pow(10, 8)
ELSE 0
END) city_id,
(CASE WHEN m.type >= '2'
THEN left(m.location_id, 6) * pow(10, 6)
@youzipi
youzipi / build_test_data.sql
Created August 6, 2016 07:48
构造测试数据
DROP PROCEDURE IF EXISTS build_test_data;
DELIMITER #
CREATE PROCEDURE build_test_data()
BEGIN
DECLARE v_max INT UNSIGNED DEFAULT 20;
DECLARE v_counter INT UNSIGNED DEFAULT 0;
START TRANSACTION;
@youzipi
youzipi / ObjectList-toMap.java
Last active September 22, 2016 02:32
stream,collection
Map<Long, ShoppingCart> idAndCarts = curShoppingCarts.stream()
.collect(Collectors.toMap(
ShoppingCart::getGoodsInfoId,
cart -> cart // equal to `identity()`
// ,
// (k, v) -> v
));
@youzipi
youzipi / validate.js
Created September 13, 2016 01:40
jquery.validate
$("#newCustomerForm").validate({
submitHandler: function (form) {
form.submit();
},
errorPlacement: function (error, element) {
error.appendTo(element.parents('.form-group'));
},
rules:{
customerUsername: {
isMobile:true,
@youzipi
youzipi / start.sh
Created April 14, 2017 09:12 — forked from lhcpig/start.sh
jenkins 部署spring-boot应用
#!/bin/sh
nohup /usr/bin/java -jar $1 >> $2 &
@youzipi
youzipi / gist:c8969e0df1652363990cf8a18a5c7129
Created April 18, 2017 08:46 — forked from jmvrbanac/gist:7920633
Using pyenv virtualenvs in a Jenkins Job
#!/bin/bash
set +x
# Setup all of the pyenvs
export PATH="$HOME/.pyenv/bin:$PATH"
export CONFIGURE_OPTS='--enable-shared'
eval "$(pyenv init -)"
pyenv shell 2.7.5
pyenv virtualenvwrapper
pyenv rehash