Kamis, 15 Februari 2018

Firebird isql shell command in Linux

- vim yourshellsql.sh

#!/bin/sh/usr/bin/isql-fb -user YOURUSERNAME -password YOURPASSWORD -database -x '/path/DATABASE.GDB' <<EOF









- ./yourshellsql.sh


- https://it.toolbox.com/question/how-to-invoke-sybase-commands-in-a-shell-script-040411

- https://www.unix.com/shell-programming-and-scripting/45212-isql-query-unix-shell-script.html

Rabu, 14 Februari 2018

SSL certificate problem: unable to get local issuer certificate

- config php.ini
- enable curl.cainfo=
- edit curl.cainfo= to curl.cainfo=/your/path/cacert.pem (i download from https://curl.haxx.se/ca/cacert.pem, <my development>)

install curl in Windows 10

- run Command Prompt as Administrator
- paste @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
choco install curl

Source: https://chocolatey.org/install#installing-chocolatey

Rabu, 07 Februari 2018

virtual environment python in Windows

- pip install virtualenv
- pip install virtualenvwrapper-win
- mkvirtualenv virtualpython3

C:\Users\webDev\Envs is not a directory, creating
Using base prefix 'c:\\python36'
New python executable in C:\Users\webDev\Envs\virtualpython3\Scripts\python.exe
Installing setuptools, pip, wheel...done.
(virtualpython3) webDev@WEBDEV-PC E:\doni\

- https://virtualenv.pypa.io/en/stable/userguide/
- http://timmyreilly.azurewebsites.net/python-pip-virtualenv-installation-on-windows/
- https://stackoverflow.com/questions/46869528/install-python-3-6-3-in-virtualenv-using-pip-in-windows-10

Kamis, 01 Februari 2018

remote AWS using terminal on Mac OSX

- Convert .ppk to .pem

  • puttygen server.ppk -O private-openssh -o server.pem (if puttygen not installed, brew install putty)

- chmod go-rw server.pem
- ssh -i server.pem user@hostname


  • https://stackoverflow.com/questions/33273180/create-a-pem-from-a-ppk-file
  • https://www.ssh.com/ssh/putty/mac/
  • https://www.youtube.com/watch?v=q6Hm-JIzjT8

Selasa, 30 Januari 2018

MC (Midnight Commander) keyboard shortcut for Mac OSX

----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name
Open same working directory in the inactive panel: Esc + i
Open parent working directory in the inactive panel: Esc + o
Go to top of directory in active pane: Esc + v / Esc + g
Go to bottom of directory in active pane: Esc + j / Ctrl + c
Go to previous directory: Esc + y
Search pop-up: Esc + ?
----- Ctrl -----
Refresh active panel: Ctrl + r
Selecting files and directories: Ctrl + t
Switch active <-> inactive panels: Ctrl + i
Switch active <-> inactive panels content: Ctrl + u
Execute command / Open a directory: Ctrl + j
----- F -----
F1: help
F2: user menu
F3: read file / open directory
F4: edit file
F5: copy file or direcotry
F6: move file or directory
F7: create directory
F8: delete file / directory
F9: open menu bar
F10: exit MC

Copied from: http://pastebin.com/i9kfVKT9

Source: https://gist.github.com/sgergely/3793166

install php 7.1 using brew

brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew unlink php56
brew install php71
close terminal

source: https://developerjack.com/blog/2015/installing-php7-with-homebrew/

error when install brew on Mac OSX 10.12

error message:

fatal: cannot copy '/usr/local/git/share/git-core/templates/hooks/pre-receive.sample' to '/usr/local/Homebrew/.git/hooks/pre-receive.sample': Permission denied
Failed during: git init -q

sudo chown -R $USER /usr/local

source:  https://github.com/Homebrew/legacy-homebrew/issues/36262