Search This Blog

Sunday, December 25, 2016

git rebase -i --root master

Rebase up to the initial commit

Saturday, December 24, 2016

.vimrc example

syntax on
set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab

ls alias

alias ls='ls --color=auto'

OSX: alias ls='ls -G'

Sunday, December 18, 2016

github syncing a fork

https://help.github.com/articles/syncing-a-fork/

Sycing a fork with the upstream repository keeps the fork up-to-date.

$ git fetch upstream
$ git merge upstream/master


Sunday, December 11, 2016

git config --local core.quotepath false

for multibyte code file name

Friday, November 25, 2016

fuse-ext2 for Mac OS Sierra

https://github.com/gpz500/fuse-ext2/releases

Sunday, November 6, 2016

cygstart (OS X open command in Cygwin)

Add this in the end of bashrc

alias open='cygstart'

ref. http://stackoverflow.com/questions/577595/open-a-file-from-cygwin

Wednesday, November 2, 2016

Cygwin XWin for larger dpis

$ run XWin -multiwindow -clipboard -dpi 150

Monday, October 31, 2016

Firefox user-agent switcher and masking agent

https://addons.mozilla.org/en-US/firefox/addon/user-agent-switcher-firefox/

https://addons.mozilla.org/en-US/firefox/addon/masking-agent/

Firefox from OS X terminal

- Shell script: /opt/local/bin/firefox

#!/usr/bin/env sh

/Applications/Firefox.app/Contents/MacOS/firefox "$@"

- Profile select on start up

/Applications/Firefox.app/Contents/MacOS/firefox-bin -profilemanager

Friday, October 28, 2016

x11 cygwin application in terminal

1. Run startxwin

2. Set env variable DISPLAY

export DISPLAY=:0.0

3. Run X11 application

Thursday, October 27, 2016

Cygwin x64 on Windows 10?

Using direct connection results in various errors, such as run time and setup.ini rejection. Using Internet Explorer proxy settings may solve this issue.

Friday, October 7, 2016

OS X Atom symbolic link setup

sudo ln -s /Applications/Atom.app/Contents/Resources/app/atom.sh /opt/local/bin/atom

Tuesday, September 20, 2016

Custom bin path in .bashrc (*nix) or .profile (OS X)

# Set path for custom binaries
HOMEBIN=$HOME/bin
if [ -d "$HOMEBIN" ]; then
    export PATH="$HOMEBIN:$PATH"
fi

Saturday, September 17, 2016

Amazon free private git repo

https://aws.amazon.com/codecommit/

Tuesday, September 6, 2016

Friday, September 2, 2016

atom symbolic link in OS X

ln -s /Applications/Atom.app/Contents/Resources/app/atom.sh /usr/local/bin/atom

Thursday, September 1, 2016

Cygwin Git modified file inconsistency introduced by synchronization

When a repository is synchronized using cygwin unison through Windows network file sharing, the file modes would be corrupted. This is because of the incompatibility between the ways in which Windows and Cygwin look at the files. In this case, git would mark the files modified even if those files were not modified. Having git ignore the file modes can resolve this issue.

git config --local core.filemode false

Unison keep timestamp

-times=true


rsync backup

rsync -avzPrt ./local_dir id@domain:~/target_dir/

This command creates a directory using the name of 'local_dir' within the target_dir, and synchronizes contents.

So, how can I compare the source and the copy????

Wednesday, August 17, 2016

OSMC (Raspberry pi) motion mmal

sudo modprobe bcm2835-v4l2

* Loading the module at boot time
echo bcm2835-v4l2 >> /etc/modules

chmod a+rw /dev/video0
v4l2-ctl --set-ctrl vertical_flip=1
v4l2-ctl --set-ctrl horizontal_flip=1

* Trim data cron example

5 5 * * * find /home/user/motion -mtime +7 -type f -delete
5 5 * * * find /home/user/motion -mtime +1 -type f -iname '*.jpg' -delete

Tuesday, April 12, 2016

VS2015 migration issue

http://stackoverflow.com/questions/32291678/vs2015-migrated-project-compiles-but-wont-run-debug-assertion-failed

Another solution:

// int main(cli::array^ args)
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
_In_opt_ HINSTANCE hPrevInstance,
_In_ LPWSTR    lpCmdLine,
_In_ int       nCmdShow)
{
...
}

Sunday, March 20, 2016

Saturday, March 5, 2016

Friday, February 12, 2016

Python google client api auth error

http://stackoverflow.com/questions/27870024/google-gmail-api-installed-app-shows-ioerror-13-from-module-ssl-py-w-o-sudo

Blog Archive