When using mysql client to login MySQL, it throws the following error: If it’s alpine linux, then simply install mariadb-connector-c
Category: Platforms
Disable Swap in Raspberry Pi
Linux Docker uses excessive memory
Issue: I have a 16G memory and configured swap as 16G. When start mysql docker, mysqld uses crazy amount of memory and make the system freeze. References: https://success.docker.com/article/node-using-swap-memory-instead-of-host-memory Solution
Setup Gitlab & Jenkins on Raspberry Pi 2
Objective: Installing and configuring Gitlab and Jenkins on Raspberry Pi 2 Background: I currently have extra Raspberry Pi and would like to use for something useful. I found Jenkins and Gitlab are able to install on Raspberry Pi. This article is to share the step by step guide how to setup Gitlab and Jenkins…
[따라하기] 아두이노 기초 – 초음파센서 사용하기 by ODIY 한국과학창의재단
[따라하기] 아두이노 기초 – 초음파센서 사용하기 by ODIY 한국과학창의재단 Ardunio – Ultrasound sensor with LED #define TRIG 2 // Sending out ultrasound #define ECHO 3 // Receiving ultrasound #define LED 9 // Controlling LED void setup() { // put your setup code here, to run once: pinMode(TRIG, OUTPUT);…
[따라하기] 아두이노 기초 – LED와 버튼 제어하기 by ODIY 한국과학창의재단
[따라하기] 아두이노 기초 – LED와 버튼 제어하기 by ODIY 한국과학창의재단 Arduino – LED Wave #define DELAY_TIME 100 void setup() { // put your setup code here, to run once: pinMode(2, OUTPUT); pinMode(3, OUTPUT); pinMode(4, OUTPUT); pinMode(5, OUTPUT); pinMode(6, OUTPUT); } void loop() { // put your main code here,…
Time Clock Management System developed with Yii2 REST API + Angular 2 + Docker
Time Clock Management System (Yii2 REST API + Angular 2 + Docker) Source Repo: https://github.com/chrisleekr/time-clock-management-system-yii2-rest-api-angular2-docker This is a personal project for learning Angular 2. The project contains two applications, one for REST API backend, and the another for Angular 2 frontend. The project involves: Yii2 for providing RESTful API including user login/logout, managing global…
Docker 1.12 – Deploying Docker Services within Docker Swarm Mode and Docker Machine
Docker 1.12 – Deploying Docker Services within Docker Swarm Mode and Docker Machine Source Repo: https://github.com/chrisleekr/docker-swarm-scalable-web-application-architecture This is proof-of-concept project to set up Docker Swarm in development environment with single command. This project involves: Docker Machine Docker Swarm – Docker Built-in Orchestration Local Docker Registry Docker Network Docker Service Note: This project is created for…
Raspberry pi에 Let’s Encrypt SSL 설치하기
Raspberry Pi의 IP를 알아낸다음에 Router에서 DMZ를 설정하여 외부 IP로 접속할 경우 Raspberry Pi로 접근이 되도록 한다. Raspberry Pi에 아파치를 설치한다. 설치방법: https://www.raspberrypi.org/documentation/remote-access/web-server/apache.md 외부 IP로 접속하여 Apache 설치 여부를 확인한다. Raspberry Pi에 다이나믹 도메인을 연결한다 https://www.noip.com (무료) 에 가입을 한다 NoIP Dynamic Update Client를 다운로드 및 설치한다. 다운로드: https://www.noip.com/download?page=linux 설치방법: https://www.noip.com/support/knowledgebase/installing-the-linux-dynamic-update-client-on-ubuntu/ 다이나믹 도메인 (http://xxxxx.ddns.net)에 접속이 되는지 확인한다….
Secure Raspberry Pi with iptables, PSAD, Fail2ban and OSSEC
Disable ping $ echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all Install iptables and iptables-persistent $ sudo apt-get install iptables iptables-persistent $ sudo service iptables-persistent start Create shell script $ nano reset_iptables.sh #!/usr/bin/env bash iptables -F iptables -A INPUT -i lo -j ACCEPT iptables -A OUTPUT -o lo -j ACCEPT iptables -A INPUT -m conntrack –ctstate ESTABLISHED,RELATED…
Docker Tor+Proxy
Run tor and proxy server in docker and set Chrome browser to send all traffics to docker tor proxy server Environment: Windows 7 Docker Toolbox – https://www.docker.com/products/docker-toolbox Proxy Helper – https://chrome.google.com/webstore/detail/proxy-helper/mnloefcpaepkpmhaoipjkpikbnkmbnic?utm_source=chrome-app-launcher-info-dialog Step 1: Create docker-compose-tor.xml version: ‘2’ services: torproxy: image: jess/tor-proxy expose: – “9050” restart: “always” privoxy: image: jess/privoxy links: – torproxy ports: – “8118:8118” expose: – “8118” restart:…
Raspberry Pi – Push Button + LED
import RPi.GPIO as GPIO from time import sleep PIN18 = 12 PIN25 = 22 GPIO.setmode(GPIO.BOARD) GPIO.setup(PIN25, GPIO.IN) GPIO.setup(PIN18, GPIO.OUT) LEDON = False while 1: try: if GPIO.input(PIN25): if LEDON == True: print “– PIN25 ON” LEDON = False GPIO.output(PIN18, False) else: print “– PIN25 OFF” LEDON = True GPIO.output(PIN18, True) sleep(1) except KeyboardInterrupt: GPIO.cleanup()…
Python – ImportError: No module named django.utils
When I follow the tutorial – App Engine Series #4 – I got this error for Ajax.py: ImportError: No module named django.utils According to this article, Python 2.7 uses native JSON library. Fixed source for Ajax.py is this: #!/usr/bin/env python # -*- coding: utf-8 -*- # Including the models: from models.models import * # from Phyton 2.7,…
Python – ImportError: No module named
When I follow the tutorial – App Engine Series #4 – I kept getting the error like below: ImportError: No module named controllers It is caused by below code: import webapp2 # Importing the controllers that will handle # the generation of the pages: from controllers import crons,ajax,generate,mainh To fix the error, it is very simple….
Google App Engine Tutorial – Datastore – 한글 입력시 Internal Server Error 나는 현상
Google App Engine의 Datastore 튜토리얼 소스를 실행시 한글을 방명록 이름(Guestbook name)필드에 입력하면 다음과 같은 에러가 발생한다. Traceback (most recent call last): File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webapp2-2.5.2/webapp2.py”, line 1535, in __call__ rv = self.handle_exception(request, response, e) File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webapp2-2.5.2/webapp2.py”, line 1529, in __call__ rv = self.router.dispatch(request, response) File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webapp2-2.5.2/webapp2.py”, line 1278, in default_dispatcher return route.handler_adapter(request, response) File “/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webapp2-2.5.2/webapp2.py”, line 1102,…
Python – 한글로 주석 남기면 실행 안되는 현상(cannot execute app if write Korean as comment)
한글로 코멘트를 남겼는데 다음과 같은 서버 에러가 발생했다. HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request. 검색해서 Using Python with Chinese, Japanese and Korean 라는 글을 찾았고, 코드를 다음과 같이 하니 문제없이 실행되었다. #!/usr/bin/env python # -*- coding: utf-8 -*-
Sample Code from Developing and deploying an application on Google App Engine
In the video, it provides the code as below #!/usr/bin/env python import os import wsgiref.handlers from google.appengine.ext import webapp from google.appengine.ext.webapp import template class MyHandler(webapp.RequestHandler): def get(self): self.response.out.write(template.render(‘main.html’, {})) def main(): app = webapp.WSGIApplication([ (r’.*’, MyHandler)], debug= True) wsgiref.handlers.CGIHandler().run(app); if __name__ == “__main__”: main() However, it gives the error as below: Traceback (most recent call…
AIR for TV
Article Link: http://learn.adobe.com/wiki/display/airquestions/AIR+for+TV What tools do developers use to create AIR 2.5.1 apps for TVs? Developers can use the following tools: AIR 2.6 SDK Flash Professional CS5 Extension for AIR 2.5 (now an integral feature in Flash Professional CS5.5) Flash Builder 4.5 Note: Developers can use the AIR 2.6 SDK for developing apps for AIR 2.5.1 for…
Samsung TV SDK 2.5 – Javascript Error keyCode
Samsung SDK 2.5 editor provides ‘Basic Javascript Project’; however, it contains Reference Error when you launch first time like below: Error Detail : ReferenceError: keyCode is not defined It is caused because template code has capitalize error. Find below code: Main.MainKeyHandler = function() { var KeyCode = event.keyCode; switch(keyCode) { … }…
Samsung TV Application SDK UX Guideline
Samsung_TV_Application_SDK_UX_Guideline_1.0 – Version 1.0 Points 1. Design Principles – TV screen should not contain too much information. – Accurate navigation for user operation – Actions like Move, Return, Enter must be clear – TV is using a restricted control method “Remote Control” – Consistency of Button Operations (ex; Green: Sorting or Preference, Yellow: Check or…
Running Samsung TV Apps SDK on Boot Camp
I have windows running bootcamp and tried to launch Samsung TV Apps SDK(IDE); however, it crashes windows every launch. Tested so far; but crashed all the time: – Windows 7 32bit on Boot Camp 3 (iMac, Macbook Air, Macbook Pro) – Windows Vista 32bit on Boot Camp 3 (iMac) Cannot run Samsung TV IDE due…