Skip to main content

Posts

Showing posts from February, 2015
Vimium là một phần gắn vào browser như chrome, FF để mang thao tác bàn phím ở trình soạn thảo Vim vào trình duyệt. Có 1 cái cần nghiên cứu là khi muốn search 1 keyword, ta có thể dùng nhiều cách:       i. Dùng shortcut lên address bar như hầu hết browser bây giờ rồi điền keyword. --> search.       ii. Select text --> Right Click --> search with ...       iii. Gõ Vomibar (của vimium) = cách gõ phím o --> enter kw --> search.     Cả 3 cách trên đều nhanh nhất nếu ta muốn tìm 1 kw cần gõ, còn nếu muốn seach 1 kw = selected text thì đều cần tối thiểu 3 thao tác: [select text] --> [Right click] --> [search with]. Chính cái right click là bước có thể bỏ qua như các tính năng của vimium khác. --> Viết 1 script nhỏ (có thể là setting vimium) hay chrome ext, FF add-on ... để khi chỉ cần 2 bước là search đc: [select text] --> [gg] là search with google ở tab mới rồi. Vì kh

Imagick create, edit and crop image. Extract sprite image from merged file.

convert -size 2000x300 xc:grey30 -font Arial -pointsize 79 -gravity center -draw "fill grey70  text 0,0'this is my test text'" stamp_fgnd79.png  Tạo ảnh với size tuỳ ý, chèn text với các format ... http://www.imagemagick.org/discourse-server/viewtopic.php?t=14712 http://www.imagemagick.org/Usage/text/ tạo ảnh size tuỳ ý để test upload ... Muốn tạo ảnh size theo MB tuỳ ý đơn giản là dùng imagemagick merge nhiều ảnh size nhỏ là ok: http://www.imagemagick.org/script/montage.php Imagik Photo Joiner and Generate text image Imagick n FFmpeg in PHP: Generate text image   and Imagick n ffmpeg in PHP Update 1: Có 1 cách ghép ảnh hay dùng nữa là ghép theo byte, nghĩa là ảnh coi như dãy nhị phân rồi ghép tất cả lại. Cách này thì khi mở file sẽ khá to và chỉ thấy ảnh file đầu tiên. Muốn hiện ra có nhiều cách như dùng tool hay script để crop ra. Ví dụ khi bạn dùng HexEditor mở file ảnh loại này lên rồi tìm các từ HEX: 2E 50 4E 47 ~ (.PNG). Kết quả sẽ là các

Some Source code used often.

Mobile-Detect. Use simple code below: include 'Mobile_Detect.php'; $detect = new Mobile_Detect(); // Check for any mobile device. if ($detect->isMobile()) // mobile content else // other content for desktops Source code download here: Mobile Detect In Javascript, there are many script or lib to do this. Here one of mine: @extends('layouts.main') @section('head') @stop @section('content') login!! Facebook or Youtube login 【Sample CHECK!】 login!! screen 13 screen 15 screen 14 Some msg 3-12-12 笹川記念会館 Copyright ©C Official Web All rights reserved. @stop @section('script') @stop My script above is one of my index page. It write in Laravel bl