To permanently store password for git:
git config credential.helper store
Use should specify caching expire:
git config --global credential.helper 'cache --timeout 7200'
Tuesday, 27 October 2015
Git aliases
[diff]
algorithm = patience
[http]
sslVerify = false
[push]
default = matching
[alias]
stat = status
co = checkout
lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold yellow)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(whit
)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg = !"git lg1"
sb = submodule
algorithm = patience
[http]
sslVerify = false
[push]
default = matching
[alias]
stat = status
co = checkout
lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold yellow)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(whit
)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg = !"git lg1"
sb = submodule
Saturday, 26 September 2015
Zyxel install ffp plugin
Be sure you have installed latest firmware.
After enter the next directory:
$ cd /i-data/md0/admin/zy-pkgs
and download the following web_prefix file (of course you can enter it manually)
$ wget http://downloads.zyxel.nas-central.org/Users/Mijzelf/zypkg-repo/web_prefix
Via web UI go to Firmware and packages – Packages – press retrieve list from the internet. Only the MetaRepository package should show up. Install it, and re-request the list.
And now you can enjoy new pkgs.
After enter the next directory:
$ cd /i-data/md0/admin/zy-pkgs
and download the following web_prefix file (of course you can enter it manually)
$ wget http://downloads.zyxel.nas-central.org/Users/Mijzelf/zypkg-repo/web_prefix
Via web UI go to Firmware and packages – Packages – press retrieve list from the internet. Only the MetaRepository package should show up. Install it, and re-request the list.
And now you can enjoy new pkgs.
Friday, 25 September 2015
NSA325-v2, assemble Raid partition
To check existing RAID partition:
$ cat /proc/mdstatTo assemble the raid array:
$ mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1
To stop:
$ mdadm --stop /dev/md1
Now you can mount the raid array to mount point:
$ mount /dev/md1 /root/md1
Zyxel NSA325v2 How to mount a ntfs as internal disk
First, determine new disk:
$ su
enter your password
$ fdisk -l
$ mount -t tntfs -o iostreaming,noatime,ioblocksize=1048576,min_iostreaming_read_iosize=524288,min_iostreaming_write_iosize=1048576,nls=utf8 /dev/sdb1 /e-data/4T
$ su
enter your password
$ fdisk -l
$ mount -t tntfs -o iostreaming,noatime,ioblocksize=1048576,min_iostreaming_read_iosize=524288,min_iostreaming_write_iosize=1048576,nls=utf8 /dev/sdb1 /e-data/4T
Wednesday, 12 August 2015
Linux debug tips
Debug dynamic libraries loading:
LD_DEBUG=files ./myprogram
Show all unresolved symbols:
ldd -r -d myprogram
Show mangled symbol names:
nm -C /home/xxx/libs/libxxxdb.so
LD_DEBUG=files ./myprogram
Show all unresolved symbols:
ldd -r -d myprogram
Show mangled symbol names:
nm -C /home/xxx/libs/libxxxdb.so
Sunday, 12 July 2015
VS visualizers and usertype.dat
User type keywords
In Visual Studio you can define custom keywords:
usertype.dat next to the devenv.exe
Example content:
Vec3
Vec4
Rectangle
etc...
One line one word, so simple.
-------------------------------------------------------------------------------------------------------------------
Now about the visualizers
You have to place visualizer files under:
c:\Users\YourName\Documents\Visual Studio 2013\Visualizers\
e.g.:
example.natvis
To enable natvis debugger
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0_Config\Debugger]
"EnableNatvisDiagnostics"=dword:00000001
In Visual Studio you can define custom keywords:
usertype.dat next to the devenv.exe
Example content:
Vec3
Vec4
Rectangle
etc...
One line one word, so simple.
-------------------------------------------------------------------------------------------------------------------
Now about the visualizers
You have to place visualizer files under:
c:\Users\YourName\Documents\Visual Studio 2013\Visualizers\
e.g.:
example.natvis
To enable natvis debugger
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0_Config\Debugger]
"EnableNatvisDiagnostics"=dword:00000001
Later I will describe it.
Example:
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="Rectangle">
<DisplayString>A rectangle with height = {height} {width} </DisplayString>
<Expand>
<Item Name="height">height</Item>
<Item Name="width">width</Item>
<Item Name="area">height * width</Item>
<Item Name="macik">macik</Item>
<ExpandedItem>macik</ExpandedItem>
<Synthetic Name="Am I a square?" Condition="height==width">
<DisplayString>Yes I am. </DisplayString>
</Synthetic>
<Synthetic Name="Am I a square?" Condition="height!=width">
<DisplayString>No I am not.</DisplayString>
</Synthetic>
</Expand>
</Type>
<Type Name="Rectangle2">
<DisplayString Condition="height == 4">negy = {height} {width} </DisplayString>
<DisplayString Condition="height == 3">harom</DisplayString>
<Expand>
<Item Name="height">height</Item>
<Item Name="width">width</Item>
<Item Name="area">height * width</Item>
</Expand>
</Type>
<Type Name="std::vector<*>">
<Expand>
<Item Name="[size]">_Mylast - _Myfirst</Item>
<!-- <Item Name="[capacity]">(_Myend - _Myfirst)</Item>-->
<ArrayItems>
<Size>_Mylast - _Myfirst</Size>
<ValuePointer>_Myfirst</ValuePointer>
</ArrayItems>
</Expand>
</Type>
</AutoVisualizer>
Subscribe to:
Posts (Atom)