most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat| #!/bin/sh | |
| #----------------------------------------------------------------------------------------# | |
| # Hex over TCP with Echo and Netcat # | |
| #----------------------------------------------------------------------------------------# | |
| echo -n -e "x01x18x03" | nc 192.168.1.4 80 | |
| # The -n supresses outputting the trailing newline. | |
| # The -e enables the interpretation of backslash escapes -- allowing us to send hex codes. |
| import android.app.Activity; | |
| import android.app.Service; | |
| import android.content.BroadcastReceiver; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.content.IntentFilter; | |
| import android.os.Bundle; | |
| import android.os.IBinder; | |
| import android.support.v4.content.LocalBroadcastManager; |
| PackageInfo info; | |
| try { | |
| info = getPackageManager().getPackageInfo("ecentinela.mercadotes", PackageManager.GET_SIGNATURES); | |
| for (Signature signature : info.signatures) { | |
| MessageDigest md; | |
| md = MessageDigest.getInstance("SHA"); | |
| md.update(signature.toByteArray()); |
| #!/usr/bin/env bash | |
| SOURCE_PATH=$1 | |
| for f in "$SOURCE_PATH"/*.png; do | |
| fullname=$(basename "$f") | |
| filename=${fullname%@2x.*} | |
| imageset="$SOURCE_PATH"/"$filename".imageset | |
| jsonfile="$imageset"/Contents.json |
| #!/usr/bin/env python | |
| # -*- coding: UTF-8 -*- | |
| ''' | |
| @package smi2srt | |
| @brief this module is for convert .smi subtitle file into .srt subtitle | |
| (Request by Alfred Chae) | |
| Started : 2011/08/08 | |
| license: GPL |
안드로이드 개발에서 많은 비중을 차지하는 UI패턴은 ListView에서 여러 이미지를 보여주는 Activity입니다. 전형적인 흐름을 정리하면 아래와 같습니다.
1. 목록조회 API호출
2. API를 파싱하고 ListView에 데이터를 보여 줌.
3. 각 아이템마다의 이미지 주소로 다시 서버를 호출
4. 이미지를 디코딩하고 ImageView에서 보여줌.