Skip to content

Instantly share code, notes, and snippets.

@zhenyi2697
zhenyi2697 / test-feed-prestashop.xml
Created September 26, 2019 09:02
Test feed prestashop
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">
<channel>
<item>
<g:id>demo_14</g:id>
<g:multipack>0</g:multipack>
<g:brand>Studio Design</g:brand>
<g:gtin></g:gtin>
<g:sku>demo_14</g:sku>
<g:item_group_id>19</g:item_group_id>
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">
<channel>
<title>Advertiser 005</title>
<description>Advertiser 005 data feed template.</description>
<link>http://testadvertiser005.com</link>
<item>
<title>product_0</title>
<g:image_link>http://www.testadvertiser005.com/img.php?p=0</g:image_link>
<link>http://www.testadvertiser005.com/product.php?p=0</link>
@zhenyi2697
zhenyi2697 / gist:5de715252911d3f4a79dc92674a28981
Created April 5, 2017 09:11
Memory utilisation for jboss
tail -f verbosegc.log | grep "concurrent mark-sweep generation "
git subtree add --prefix=atlas-gui "appgit@git.intramundi.com:atlas/atlas-gui.git" dev
Sometimes, master branch contains obsolete codes, and another branch is more "stable" and will be released to production.
If you merge this branch into master, you will find a lot of conflits for unknonw reason. And now, you want to make the other branch as your master.
You can:
git checkout more_stable_branch
git merge -s ours master
git checkout master
git merge more_stable_branch
* If want to declare private constans, define in .m file
static NSString *const MyThingNotificationKey = @"MyThingNotificationKey";
* If want to declare public constants, declare in .h file:
extern/FOUNDATION_EXTERN NSString *const name in
and define the value in .m file:
@zhenyi2697
zhenyi2697 / get_loaded_class_on_runtime
Created February 1, 2016 18:57
Get loaded class on runtime
MyClass.class.getProtectionDomain().getCodeSource()
@zhenyi2697
zhenyi2697 / git_store_credential_windows_from_1.7
Created October 20, 2015 08:10
Git store credential windows
git config --global credential.helper wincred
git config credential.helper 'cache --timeout=3600'
@zhenyi2697
zhenyi2697 / git_ignore_files.txt
Last active September 15, 2015 11:26
Git Ignore files
There are 4 ways to ignore git files:
1. The most basic, add to .gitignore
2. Not yet tracked file, and don't want to add to .gitignore, can add to .git/info/exclude
This will just ignore files locally and the settings will not be shared with others
3. Already tracked files, and has already been modified locally, want to ignore local changes
git update-index --[no-]skip-worktree FILE_NAME // works for one file

git里ignore文件有四种方式

  1. 最基本的,放在.gitignore里
  2. 还未track的文件,但是不想放到.gitignore里,可以放到 .git/info/exclude里

vim .git/info/exclude

  1. 已经track的文件,而且被本地修改了,想要ignore本地的修改

find ./ -name "*.launch" -exec git update-index --[no-]skip-worktree '{}' ;