Backup 光华e报

Kwongwah ePaper Location

Internal – /sdcard/Android/data/com.newspaperdirect.kwongwah.android/files/kwongwah/issues
SD Card – /storage/sdcard1/Android/data/com.newspaperdirect.kwongwah.android/files/kwongwah/issues

Achive Old Kwongwah ePaper to SD Card

$ cd /sdcard/Android/data/com.newspaperdirect.kwongwah.android/files/kwongwah/issues
$ cp -R * /storage/sdcard1/Android/data/com.newspaperdirect.kwongwah.android/files/kwongwah/issues

Copy Specified Kwongwah Issues into (tablet) Reader

  1. Force Close Kwongwah ePaper under tablet settings.
  2. Copy backup issue from SD card back to internal memory.
$ cd /storage/sdcard1/Android/data/com.newspaperdirect.kwongwah.android/files/kwongwah/issues
$ cp -R issue_name /storage/sdcard1/Android/data/com.newspaperdirect.kwongwah.android/files/kwongwah/issues
  1. Open from Kwongwah ePaper.
  2. Enjoy.

一鍵清理

If you ever install 电视管家 to any of your TV box then 一鍵加速 & 一鍵清理 will come together with it. Use 一鍵加速 for cleanup purpose. I found out 一鍵清理 will not only clear cached but will clear your application data as well which you’ll lost all your configuration and user profile especially your got Kodi installed like me.

Hope this help.

一鍵清理.png

Footnote in Markdown

There are no footnote syntax in markdown. The closer is a link syntax but not footnote.

... [title] ....
....
[1]: url

So the only trick want to implement footnote is to use superscript to indicate that LOL

⁰ - \u2070
¹ - \u00b9 (alt+0185)
² - \u00b2 (alt+0178)
³ - \u00b3 (alt+0179)
⁴ - \u2074
⁵ - \u2075
⁶ - \u2076
⁷ - \u2077
⁸ - \u2078
⁹ - \u2079

see also https://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts

Migrate Archive Google Code SVN to Git

Requirements

  • git
  • git-svn

Setup¹

$ sudo apt-get install git
$ sudo add-apt-repository ppa:git-core/ppa
$ sudo apt-get update
$ sudo apt-get install git-svn

¹ Ubuntu 14.04

How To

  1. Download svn dump from Google archive.
  2. Create a local svn repo by load the svn dump.
  3. Start svn daemon.
  4. Create authors.txt to map all svn users to git users.
  5. Create a bare git repo.
  6. git svn clone.
  7. Add git remote then push.
  8. Done.
$ wget https://storage.googleapis.com/google-code-archive-source/v2/code.google.com/your-google-code-project/repo.svndump.gz
$ gunzip repo.svndump.gz
$ svnadmin create /tmp/repo1
$ svnadmin load /tmp/repo1/ < repo.svndump
$ svnadmin --foreground -d

Start a new terminal Window

$ git svn --stdlayout -A authors.txt clone svn://localhost/tmp/repo1/
$ cd repo1
$ git remote add origin https://repo.git
$ git push --set-upstream origin master

authors.txt

Must map all svn users to git users.

user1 = user1 <user1@email.com>
user2 = user2 <user2@email.com>
(no author) = user3 <user3@email.com>

Credits

SSRS Field Name Changes

Basically SSRS is in xml format. We can safely modify with text editor if you know what exactly changes you want to change rather than open with Visual Studio. Of course, I’m not recommend here you can always use text editor to make changes to the report and layout, definitely Visual Studio only has all the complete feature.

The thing I try to point out here is if there is a minor field name changes or dimension name changes you can safely to find and replace with normal text editor. I’ve confirmed that by diff two versions which modified using Visual Studio. Basically the only changes is field name change, not other else.

Original

<ID xsi:type="Level">
                      <DimensionName>DefaultDimension</DimensionName>
                      <HierarchyName>SiteName</HierarchyName>
                      <HierarchyUniqueName>[DefaultDimension].[SiteName]</HierarchyUniqueName>
                      <LevelName>SiteName</LevelName>
                      <UniqueName>[DefaultDimension].[SiteName].[SiteName]</UniqueName>
                    </ID>

Change to

<ID xsi:type="Level">
                      <DimensionName>Project</DimensionName>
                      <HierarchyName>SiteName</HierarchyName>
                      <HierarchyUniqueName>[Project].[SiteName]</HierarchyUniqueName>
                      <LevelName>SiteName</LevelName>
                      <UniqueName>[Project].[SiteName].[SiteName]</UniqueName>
                    </ID>

Move git folder to new repo and retains commit history

If you think a specified folder in your existing repo should be park at other repo then this is a good example to show how to do that and also you never lost any commit history.

Let say I have a repoA with a \folderB which will move into a new repoB

cd \repoA
git filter-branch –-subdirectory-filter folderB -- --all
mkdir folderB
mv * folderB
git add .
git commit

cd ..
git clone repoB.git
cd \repoB
git remote add repoA ..\repoA
git pull repoA master
git remote rm repoA
git push

**caution: You need to create a new repo without any commit yet otherwise you’ll get below error.

fatal: refusing to merge unrelated histories

see http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/

Clone existing git over new Repo

It is good for us to start from something existing or build on top of existing repo if there is any similar to what we’re looking for rather than build from sketch. I know we can easily to download existing source and directly git add . to you brand new repo. But this will lost all commit history from original author. Usually that is good practice also to remain all the commits history from the day 1. By adding new remote then force push basically this can remain all the previous history.

git clone repo.git
git remote add openshift repo2.git
...
git commit -a -m "message"
...
git push
git push openshift master --force