Skip to content

Chris' Laboratory

chrislee.kr – Personal blog as bookshelves

Menu
  • Home
  • Github
  • Contact Me
Menu

Author: Chris Lee

money_format_alt

Posted on 04/06/201410/09/2016 by Chris Lee

Alternative code snippet for money_format function money_format_alt($amount, $decimal, $symbol = ‘$’, $symbol_right = ”, $symbol_thousands = ‘,’, $symbol_decimal = ‘.’) { if ($amount < 0) return ‘-‘.$symbol . (number_format(abs($amount), $decimal, $symbol_decimal, $symbol_thousands)) . $symbol_right; return $symbol.number_format($amount, $decimal, $symbol_decimal, $symbol_thousands).$symbol_right; }  

Continue reading

Magento – Add Open Graph Tags in Meta

Posted on 29/05/201411/09/2016 by Chris Lee

Ah…. Big mistake. Magento has good plugin called Creare SEO (http://www.magentocommerce.com/magento-connect/creare-seo.html). It has Twitter Cards and Open Graph. Install above plugin. —— Discard below contents Open template’s header file and add below after any existing meta tag. Change ‘images/logo.png’ to your logo. Other meta tags will be automatically filled. <meta property=”og:title” content=”<?php echo $this->getTitle() ?>”…

Continue reading

Magento Error 403 Forbidden

Posted on 18/05/201418/05/2014 by Chris Lee

Experienced Magento error 403, which was painful. Looked up Google and found it can happen in many case. Mostly, the reason it happens is permission issue. If you see the file permissions is not 644 for files and 755 for directories, then you have to doubt permission issue. The solution is running permission change command in SSH;…

Continue reading

EnvironmentError: mysql_config not found

Posted on 09/05/201429/08/2020 by Chris Lee

I am using Mac OS X 10.9, MAMP 1.9 (MySQL 5.1.44), Python 2.7.5. Got this error when I change database configuration in settings.py. I felt this issue can make me painful, so I start logging what happened and how I fixed. Do not follow below steps. Just go straightly bottom of article and read last…

Continue reading

Thunderbird Extensions

Posted on 15/04/201429/08/2020 by Chris Lee

Expression Search /GMailUI: https://addons.mozilla.org/en-US/thunderbird/addon/gmailui/    

Continue reading

Magento Installation – Fresh Start

Posted on 12/04/201422/05/2019 by Chris Lee

1. Install Magento, Theme 2. Set up .htaccess 3. Install SMTP Pro Extension: http://www.magentocommerce.com/magento-connect/aschroder-com-smtp-pro-email-free-and-easy-magento-emailing-for-smtp-gmail-or-google-apps-email.html 4. Install Fontis Australia Extension Extension: http://www.magentocommerce.com/magento-connect/fontis-australia.html 5. Tax Configuration – Go to System -> Sales -> Tax Tax Classes Tax Class for Shipping: Shipping Calculation Settings Tax Calculation Method Based On: Total Tax Calculation Based On: Shipping Address Catalog Prices:…

Continue reading

Slow Android Emulator, install Intel x64 Emulator Accelerator (HAXM)

Posted on 26/03/201426/03/2014 by Chris Lee

일단 먼저 읽어봐야할것들 Is your Android emulator just too slow? https://www.infinum.co/the-capsized-eight/articles/is-your-android-emulator-just-too-slow Why is the Android emulator so slow? http://stackoverflow.com/questions/1554099/why-is-the-android-emulator-so-slow 8 Tips to Speed Up Your Android ARM Emulator (AVD) http://delphi.org/2013/11/8-tips-to-speed-up-your-android-arm-emulator-avd/ 안드로이드 에뮬레이터가 느릴 때, Intel x64 Emulator Accelerator (HAXM)를 설치하기 Open Android SDK Manager and install Install “Extras” -> “intel x86 Emulator Accelerator (HAXM)” Execute <sdk>/extras/intel/Hardware_Accelerated_Execution_Manager/IntelHAXM.dmg. in the MAC….

Continue reading

VPS – Apache & MySQL Performance Tuning

Posted on 13/03/201429/08/2020 by Chris Lee

Apache 1. Open/Create /var/www/vhosts/{hostname}/conf/vhosts.conf 2. Add oradjust below code KeepAlive On MaxKeepAliveRequests 29 KeepAliveTimeout 15 3. Copy to make backup of apache configuration # cp -p /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.YYYY-MM-DD.bak 4. Execute below shell script one by one # ramCount=`awk ‘match($0,/vmguar/) {print $4}’ /proc/user_beancounters` # ramBase=-16 && for ((;ramCount>1;ramBase++)); do ramCount=$((ramCount/2)); done # perl -0 -p -i…

Continue reading

.htaccess GZIP Compression & Enable Keep-alive

Posted on 07/03/201410/09/2016 by Chris Lee

To make faster webpage loading, use Gzip compress and Enable keep-alive in htaccess <ifModule mod_deflate.c> AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript </ifModule> <ifModule mod_headers.c> Header set Connection keep-alive </ifModule>   In Plesk Control Panel, follow below steps Access SSH as root user Go to /var/www/vhosts/{domain}/conf Create or Modify vhosts.conf Add following code…

Continue reading

Test website speed in various server location 웹사이트 속도 체크

Posted on 07/03/201429/08/2020 by Chris Lee

Test website speed in various server location 웹사이트 속도 체크 http://www.webpagetest.org/  

Continue reading

Duplicate Cleaner 중복된 파일/노래 찾기

Posted on 06/03/201430/08/2020 by Chris Lee

Recommend to find duplicate file 중복된 파일/노래 찾기   http://www.digitalvolcano.co.uk/duplicatecleaner.html

Continue reading

Revo Uninstaller

Posted on 06/03/201429/08/2020 by Chris Lee

Recommended Uninstaller Program in Windows   http://www.revouninstaller.com/    

Continue reading

Malwarebytes Cameleon

Posted on 23/02/2014 by Chris Lee

When the computer is infected by Malware and it prevents to execute or install Anti-virus program, use Malwarebytes Cameleon to scan the computer without interrupting by Malware. Download: http://www.malwarebytes.org/chameleon/ How to Use: 1. Download Malwarebytes Chameleon 2. Extract downloaded zip file 3. Execute svchost.exe with Administrator permission. 4. The program will start installing driver, Anti-Malware and run…

Continue reading

Detect when scroll is reached end of scroll

Posted on 18/02/201410/09/2016 by Chris Lee

Using jQuery, determine that user has been scrolled until the end of element. Reference: http://stackoverflow.com/questions/6271237/detecting-when-user-scrolls-to-bottom-of-div-with-jquery $(‘.scrollable’).bind(‘scroll’, function(){ if($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight) { alert(‘end reached’); } });    

Continue reading

Chrome Adblock Plus 사용법 (부제: 호주바다 광고없애기)

Posted on 17/02/201430/08/2020 by Chris Lee

1. Chrome을 연다 2. Adblock Plus 플러그인을 설치한다. https://chrome.google.com/webstore/detail/adblock-plus/cfhdojbkjhnklbpkdaibdccddilifddb 3. 오른쪽 상단 바에 설치된 Adblock Plus 아이콘을 누르고, Options를 선택한다. 4. “Add your own filters” 탭을 클릭하고 다음을 추가한다. 주의: 주소 맨 뒤에 * (별표)를 빼먹지 말자. http://hojubada.com/banner/* 5. 호주바다 사이트로 들어가 확인해본다. 적용후   적용전 참고: Adblock Plus는 사이트에서 광고가 없어진게 아니라, 클라이언트 단에서…

Continue reading

Codeigniter CRUD Model Code Generator

Posted on 13/02/201418/02/2014 by Chris Lee

    http://chrislee.kr/sources/generate_ci_model/      

Continue reading

DNS Prefetching to reduce DNS resolution time

Posted on 16/01/201410/09/2016 by Chris Lee

<!DOCTYPE HTML> <html> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ /> <link rel=”dns-prefetch” href=”//www.robgravelle.com/”> …   “The recommended best practice is to have your prefetch requests queued to the client OS as early as possible. It is also preferred to have them received in the first packet of the HTML. Therefore, explicit prefetch links should be placed…

Continue reading

Raspberry Pi – Push Button + LED

Posted on 17/11/201310/09/2016 by Chris Lee

  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()…

Continue reading

Magento – rules to fix catalog price rule price

Posted on 04/11/201310/09/2016 by Chris Lee

Refer http://www.pacificwebtechnology.com/blog/magento-rules-to-fix-catalog-price-rule-issue/   1. Make pricerule.php in root folder <?php require_once ‘app/Mage.php’; // if your are not root folder then write the proper path like publichtml/magento/app/Mage.php Mage::app(‘default’); $catalogRule = Mage::getModel(‘catalogrule/rule’); $catalogRule->applyAll(); Mage::app()->removeCache(‘catalog_rules_dirty’); ?>   2. Make cron job 0 0 * * * php /home/~/public_html/pricerule.php  

Continue reading

Make Retina display ready for input submit button with image

Posted on 28/08/201311/09/2016 by Chris Lee

When use input[type=image] for form submission, the image is stretched when use Retina Display mobile. Since you cannot change ‘src’ attribute using CSS, I had to find another way to accomplish this. Someone said to use ‘content’ in CSS can do, but I failed. And this method is not browser compatible. Anyway, you can make…

Continue reading

.htaccess to force browsers to display a download dialog for non-image files

Posted on 23/08/201329/08/2020 by Chris Lee

.htaccess to force browsers to display a download dialog for non-image files Reference: jQuery File Upload # The following directives force the content-type application/octet-stream # and force browsers to display a download dialog for non-image files. # This prevents the execution of script files in the context of the website: ForceType application/octet-stream Header set Content-Disposition…

Continue reading

Media Query Reporter CSS Injection

Posted on 03/07/201310/09/2016 by Chris Lee

Ref: http://webdesigntutsplus.s3.amazonaws.com/tuts/221_responsive_widget/Media-Query-Files-DEMO/index.html <link rel=”stylesheet” type=”text/css” media=”screen” href=”http://webdesigntutsplus.s3.amazonaws.com/tuts/221_responsive_widget/Media-Query-Files-DEMO/styles-mediaquery-reporter.css” />   Code Only: /* ====================================== MediaQuery-Reporter Styles ========================================= */ body:after { content: “less than 320px”; font-size: 300%; font-weight: bold; position: fixed; bottom: 60px; width: 100%; text-align: center; background-color: hsla(1,60%,40%,0.7); color: #fff; } @media only screen and (min-width: 320px) { body:after { content: “320 to 480px”; background-color: hsla(90,60%,40%,0.7);…

Continue reading

WordPress JSON API – Support since(from) date/time

Posted on 29/06/201311/09/2016 by Chris Lee

WordPress JSON API (http://wordpress.org/plugins/json-api/) is a powerful plugin that allows RESTful API for WordPress. However, I needed specific post query such as “Get posts since 1999/01/01 11:00:00”, which JSON API did not support. After doing hours research to do so, I couldn’t find relavant answers. Since JSON API uses WP_Query in WordPress, I thought I…

Continue reading

[PPStream – Mac] Watching PPS outside of China

Posted on 29/06/201326/09/2013 by Chris Lee

To watch PPS outside of China, add below lines to /private/etc/hosts 127.0.0.1 update.111222.cn 127.0.0.1 msg.ppstream.com Reference: http://www.weste.net/2006/10-24/09394857669.html   Alternatively, can use Chrome with extension called “Unblock Youku“. This extension will allow to watch Youku, Tudou, PPS Web, Qiy, and so on from outside of China. ​https://chrome.google.com/webstore/detail/unblock-youku/pdnfnkhpgegpcingjbfihlkjeighnddk  

Continue reading

Aptana Increase Memory Size & Excluding unnecessary files

Posted on 26/06/201326/06/2013 by Chris Lee

  Mac Application -> Aptana Studio 3 -> Click “AptanaStudio3.app” -> Right Click “Show Package Contents” -> Contents -> MacOS -> Open “AptanaStudio3.ini” with any text editor 1.  –launcher.XXMaxPermSize 512m 2.  -Xms512m 3.  -Xmx1024m -startup ../../../plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar –launcher.library ../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx_1.1.101.v20120109-1504 –launcher.XXMaxPermSize 512m –launcher.defaultAction openFile -vmargs -Xms512m -Xmx1024m -Declipse.p2.unsignedPolicy=allow -Declipse.log.size.max=10000 -Declipse.log.backup.max=5 -Xdock:icon=../Resources/aptana.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts   Windows Go to C:\Users\Chris\AppData\Local\Aptana Studio…

Continue reading
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • …
  • 9
  • Next

Categories

  • Databases (11)
    • MongoDB (4)
    • MS-SQL (1)
    • MySQL (6)
  • E-Commerce (8)
    • Magento (8)
  • Finance (2)
  • Frameworks (84)
    • Adobe Flex (1)
    • Angular (ngx) (3)
    • Codeigniter (6)
    • CSS (5)
    • Django (2)
    • Javascript (13)
    • Node.js (6)
    • PHP (17)
    • React Native (4)
    • React.js (1)
    • Sencha Touch (4)
    • Terraform (1)
    • Vue.js (1)
    • WordPress (4)
    • Yii2 (3)
  • General Documents (15)
  • Marketing (3)
  • Mobile Development (33)
    • Android (20)
    • iPhone (13)
  • Platforms (21)
    • Arduino (2)
    • Docker (5)
    • Google App Engine (5)
    • Raspberry Pi (5)
    • Samsung Smart TV (4)
  • Security (17)
  • Server (30)
    • Linux (12)
  • Tools (14)
    • SVN (7)
  • Uncategorized (2)

Search

Recent Posts

  • Taint all resources in the one module
  • Alpine – Plugin caching_sha2_password could not be loaded
  • npm link with peerDependencies
  • How to setup Gitlab runner with KVM enabled
  • Failed to transform bcprov-jdk15on-1.68.jar

Recent Comments

  • Obayed on Binance Auto Trading Bot – Buy low/Sell high with stop loss limit/Trade multiple coins
  • Ari on How to install memcache.so/memcached.so for MAMP Pro (Mac)
  • Mida ali on Binance Auto Trading Bot – Buy low/Sell high with stop loss limit/Trade multiple coins
  • Chris Lee on How to install memcache.so/memcached.so for MAMP Pro (Mac)
  • Chris Lee on Setting Up A VPN Server On OSX 10.6

Tags

1 ajax amazon android android-addpart browser chrislee-kr codeigniter codeigniter-tcpdf com-apple-net-racoon CSS CSS history hack delpaigmail-com entity-addpart-double exception-printing-is-disabled-by-default-for-security-reasons ext-plugins-listpagingplugin ext-plugins-listpagingplugin-example f iphone javascript jquery-defaultchecked jquery-samsung-smart-tv listpagingplugin mac magento-exception-printing-is-disabled-by-default-for-security-reasons magento-sample-data-exception-printing-is-disabled-by-default-for-security-reasons nu-vot null-core-errors-confignotfound-config-mk9engine-ini php samsung-smart-tv-jquery samsung-smart-tv-sdk-ajax samsung-smart-tv-sdk-jquery samsung-tv-sdk samsung-tv-sdk-jquery samsung tv sencha-smart-tv sencha-touch-list-paging smart-tv-jquery sqlite subversion svn tcedook tcpdf-codeigniter uilinebreakmodecharacterwrap-is-deprecated unknown-column-link-area

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
© 2023 Chris' Laboratory | Powered by Minimalist Blog WordPress Theme
Chris' Laboratory
Proudly powered by WordPress Theme: Dark Minimalistblogger.
 

Loading Comments...