Tuesday, September 12, 2017

Start Cake skelton project with PhpStorm


  1. apt-get install  php 
  2. Start PhpStorm and set interpreter
  3. Create a composer project
    1. check at the download composer.phar
  4. Try bin/cake server, but not working
  5. apt-get install php-xml php-mbstring php-intl
  6. At terminal, php composer.phar install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 39 installs, 0 updates, 0 removals
  - Installing cakephp/plugin-installer (1.0.0): Downloading (100%)        
  - Installing aura/intl (3.0.0): Downloading (100%)        
  - Installing mobiledetect/mobiledetectlib (2.8.26): Downloading (100%)        
  - Installing psr/http-message (1.0.1): Downloading (100%)        
  - Installing zendframework/zend-diactoros (1.5.0): Downloading (100%)        
  - Installing psr/log (1.0.2): Downloading (100%)        
  - Installing cakephp/chronos (1.1.2): Downloading (100%)        
  - Installing cakephp/cakephp (3.5.2): Downloading (100%)        
  - Installing symfony/polyfill-mbstring (v1.5.0): Downloading (100%)        
  - Installing symfony/yaml (v3.3.9): Downloading (100%)        
  - Installing symfony/debug (v3.3.9): Downloading (100%)        
  - Installing symfony/console (v3.3.9): Downloading (100%)        
  - Installing symfony/filesystem (v3.3.9): Downloading (100%)        
  - Installing symfony/config (v3.3.9): Downloading (100%)        
  - Installing robmorgan/phinx (v0.8.1): Downloading (100%)        
  - Installing cakephp/migrations (1.7.1): Downloading (100%)        
  - Installing m1/env (2.1.0): Downloading (100%)        
  - Installing josegonzalez/dotenv (2.1.0): Downloading (100%)        
  - Installing jakub-onderka/php-console-color (0.1): Downloading (100%)        
  - Installing jakub-onderka/php-console-highlighter (v0.3.2): Downloading (100%)        
  - Installing dnoegel/php-xdg-base-dir (0.1): Downloading (100%)        
  - Installing nikic/php-parser (v3.1.1): Downloading (100%)        
  - Installing symfony/var-dumper (v3.3.9): Downloading (100%)        
  - Installing psy/psysh (v0.8.11): Downloading (100%)        
  - Installing jdorn/sql-formatter (v1.2.17): Downloading (100%)        
  - Installing symfony/process (v3.3.9): Downloading (100%)        
  - Installing symfony/finder (v3.3.9): Downloading (100%)        
  - Installing seld/phar-utils (1.0.1): Downloading (100%)        
  - Installing seld/jsonlint (1.6.1): Downloading (100%)        
  - Installing seld/cli-prompt (1.0.3): Downloading (100%)        
  - Installing justinrainbow/json-schema (5.2.1): Downloading (100%)        
  - Installing composer/spdx-licenses (1.1.6): Downloading (100%)        
  - Installing composer/semver (1.4.2): Downloading (100%)        
  - Installing composer/ca-bundle (1.0.8): Downloading (100%)        
  - Installing composer/composer (1.5.2): Downloading (100%)        
  - Installing cakephp/debug_kit (3.11.1): Downloading (100%)        
  - Installing cakephp/bake (1.4.1): Downloading (100%)        
  - Installing squizlabs/php_codesniffer (3.0.2): Downloading (100%)        
  - Installing cakephp/cakephp-codesniffer (3.0.1): Downloading (100%)        
cakephp/cakephp suggests installing lib-ICU (The intl PHP library, to use Text::transliterate() or Text::slug())
symfony/console suggests installing symfony/event-dispatcher ()
m1/env suggests installing m1/vars (For loading of configs)
symfony/var-dumper suggests installing ext-symfony_debug ()
psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.)
psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.)
composer/composer suggests installing ext-zip (Enabling the zip extension allows you to unzip archives)
cakephp/debug_kit suggests installing ext-sqlite (DebugKit needs to store panel data in a database. SQLite is simple and easy to use.)
Writing lock file
Generating autoload files

Saturday, February 4, 2017

Lock out of lightdm, login repeated.

Check your home .ICEauthority permission.

1. CTRL+ALT+F1 and login on console tty.
2. change permissions to allow you to do all with 'chmod 777'

Before

-rw------- root root xxxxxx /home/joe/.ICEauthority


After 

-rwxrwxrwx root root xxxxxx .... 

Thursday, December 15, 2016

Thursday, October 8, 2015

Switch Control_L and CapsLock

At first, there seems have a bug on Ubuntu 14.04.
launchpad post

I set .Xmodmap like this.

.Xmodmap:
remove Control = Caps_Lock
remove Lock = Control_L
clear Control
clear Lock
keycode  37 = Caps_Lock NoSymbol Caps_Lock
keycode  66 = Control_L NoSymbol Control_L
!keysym Control_L = Caps_Lock
!keysym Caps_Lock = Control_L
add Control = Control_L
add Lock = Caps_Lock


When login, it's loaded gracefully.

And, what is about console?

# showkey
# dumpkeys > switchcodemap
# vi switchcodemap
# mv switchcodemap /etc/console-setup/cached.kmap.gz

you can find out which code keys has with 'showkey' command.
The consoles have another keymap from Xwindows.

Enjoy.


Thursday, September 24, 2015

NetBSD pkg download is auto unzipped with Chrome

NetBSD pkg download is auto unzipped with Chrome because Chrome gets content-type: x-tar, which is different from the download source - tgz. Chrome doesn't change its name and it confused me.

Wednesday, September 16, 2015

How to make Dansguardian allow swf objects

Add swf at the last of the file.

 /etc/dansguardian/lists/exceptionextensionlist

It needs service restart.

Monday, August 31, 2015

FreeBSD panic ffs_valloc dup alloc for samba4

After setup samba4 on FreeBSD10, starting samba cause panic.

 panic: ffs_valloc: dup alloc

UFS journaling and soft updates seemed to crash at  some duplication found.
Setting disable the journaling option works.

Boot at single user mode.

# tunefs -p /
# tunefs -n disable /
# tunefs -j disable /
# mount -u -o rw,noacls /
# rm /.sujournal
# reboot -n

After repaired, system works well and then set journaling again with no errors.