In Git you can add a submodule to a repository. This is basically a sub-repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:
- Separate big codebases into multiple repositories.
| $OutputEncoding = New-Object -typename System.Text.UTF8Encoding | |
| [Console]::OutputEncoding = New-Object -typename System.Text.UTF8Encoding |
| #!/bin/bash | |
| for dir in $(find . -name '.git' -type d) | |
| do | |
| dir=$(dirname $dir) | |
| cd $dir | |
| STATE="" | |
| if [[ -n $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then |
| using System; | |
| using System.Diagnostics; | |
| using System.Linq; | |
| using System.Linq.Expressions; | |
| using System.Reflection; | |
| namespace ConsoleApplication10 | |
| { | |
| internal delegate T ObjectActivator<out T>(params object[] args); |
| declare @empl table(name nvarchar(max) null, boss nvarchar(max) null); | |
| insert into @empl values ('Paul',null); | |
| insert into @empl values ('Luke','Paul'); | |
| insert into @empl values ('Kate','Paul'); | |
| insert into @empl values ('Marge','Kate'); | |
| insert into @empl values ('Edith','Kate'); | |
| insert into @empl values ('Pam','Kate'); | |
| insert into @empl values ('Carol','Luke'); | |
| insert into @empl values ('John','Luke'); |
| Format/result | Command | Output |
|---|---|---|
| YYYY-MM-DD_hh:mm:ss | date +%F_%T | 2017-10-16_21:47:43 |
| YYYYMMDD_hhmmss | date +%Y%m%d_%H%M%S | 20171016_214743 |
| YYYYMMDD_hhmmss (UTC version) | date --utc +%Y%m%d_%H%M%SZ | 20171016_124743Z |
| YYYYMMDD_hhmmss (with local TZ) | date +%Y%m%d_%H%M%S%Z | 20171016_214743JST |
| YYYYMMSShhmmss | date +%Y%m%d%H%M%S | 20171016214743 |
| YYYYMMSShhmmssnnnnnnnnn | date +%Y%m%d%H%M%S%N | 20171016214743670195402 |
| YYMMDD_hhmmss | date +%y%m%d_%H%M%S | 171016_214743 |
| Seconds since UNIX epoch: | date +%s | 1508158063 |
| general.smoothScroll.msdPhysics.continuousMotionMaxDeltaMS;250 | |
| general.smoothScroll.msdPhysics.enabled;true | |
| general.smoothScroll.msdPhysics.motionBeginSpringConstant;450 | |
| general.smoothScroll.msdPhysics.regularSpringConstant;450 | |
| general.smoothScroll.msdPhysics.slowdownMinDeltaMS;50 |