Skip to content

Instantly share code, notes, and snippets.

View chitacan's full-sized avatar

Bret Kim chitacan

View GitHub Profile
@chitacan
chitacan / chardify.js
Created August 8, 2013 00:54
chardin.js chrome devtools snippet.
(function () {
if ( !window.jQuery ) {
var s = document.createElement('script');
s.setAttribute('src', '//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js');
document.body.appendChild(s);
console.log('jquery loaded!');
}
if ( !window.jQuery.fn.chardinJs ) {
@chitacan
chitacan / script-tag-info.js
Created August 16, 2013 09:00
chrome devtools snippet to print script tag info.
(function() {
var scripts = document.getElementsByTagName('script');
var table = [];
function Row(){
this.name = ''; // inlined or name
this.src = '';
this.async = false;
this.etc = '';
}
function removeQuery(url) {
@chitacan
chitacan / allcolors-chart.js
Created August 20, 2013 08:54
chrome devtools snippet to show every CSS colors on the page. (print out console too)
(function(){
// forked from "https://github.com/bgrins/devtools-snippets/blob/master/snippets/allcolors.js"
// FIXME: this result is only css match count.
function allcolors() {
var allColors = {};
var props = ["background-color", "color", "border-top-color", "border-right-color", "border-bottom-color", "border-left-color"];
var skipColors = { "rgb(0, 0, 0)": 1, "rgba(0, 0, 0, 0)": 1, "rgb(255, 255, 255)": 1 };
[].forEach.call(document.querySelectorAll("*"), function (node) {
#
# zaw-src-git-log
#
# zaw source for git log.
# https://gist.github.com/4350604
#
# zaw : https://github.com/nakamuray/zaw
#
# git log pretty format: For detail, refer to "man git-log"
@chitacan
chitacan / 0_make-v8.md
Last active January 7, 2016 12:51
octobersky.js v8 스터디 발표자료

make v8

v8 의 Make 를 분석해 보자.

why we need to hack makefile?

어떤 기술을 응용해 무언가를 만들고자 할 때, 필요한 것 중 하나는 그 기술이 어떻게 구성되어 있는지 확인하는 것. 각각의 구성품들을 살펴보며, 새로운 아이디어를 얻을 수 있다.(레고)

오픈소스의 구성품들은 Makefile에 모두 기술되어 있다.

@chitacan
chitacan / AOSP_vagrant.md
Last active October 21, 2017 16:16
AOSP 개발환경을 vagrant를 활용해 좀 더 손쉽게 꾸려보자

개발환경 꾸리기

AOSP(Android Open Source Project) 개발환경을 vagrant 를 활용해 좀 더 편하게 꾸려보자

진짜?

vagrant를 활용하면 다음과 같은 명령어 만으로도 AOSP 빌드환경을 갖춘 가상머신을 생성하고 빌드를 진행할 수 있습니다.

$ wget http://goo.gl/OnTHI4 -O Vagrantfile

$ vagrant up

@chitacan
chitacan / base16-eighties.dark.tmTheme
Last active August 29, 2015 13:55
additional base16-eighties.dark color for spacegray theme.
<!-- add this after setting's key in base16-eighties.dark.tmTheme -->
<dict>
<key>name</key>
<string>Block Cursor</string>
<key>scope</key>
<string>block_cursor</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#212121</string>
class webserver{
case $operatingsystem {
ubuntu: {
$apache = 'apache2'
$configfile = '/etc/apache2/sites-enabled/000-default'
}
}
package { 'apache':
name => $apache,
@chitacan
chitacan / README.md
Last active December 13, 2024 05:54
카카오톡 움직이는 이모티콘을 gif 로 만들어보기

준비물

aosp 소스코드 & 이걸 eng 또는 userdebug 모드로 빌드한 이미지가 flash 된 넥서스 단말(jdb 만 있어도 될 것 같은데 아직 해보지는 않았음)

aosp 빌드환경을 갖추고 싶다? 여기로!!

이클립스 세팅

빌드된 aosp 코드와 이클립스를 연결해놔야 됨. 여기 참고

@chitacan
chitacan / gist:11200703
Last active September 4, 2018 08:13
AOSP 4.4_r1 의 네이티브 코드를 gdb 로 디버깅 해보자!!

hack aosp with gdb

AOSP 4.4_r1 의 네이티브 코드를 gdb 로 디버깅 해보자!!

  • 안드로이드 어플리케이션을 실행할 때 사용되는 네이티브 코드(libbinder등) 은 어떻게 디버깅 할 수 있을까?
  • 안드로이드 단말이나 에뮬레이터의 /system/bin/ 아래에 있는 바이너리들(service, am, pm 등등) 어떻게 디버깅할 수 있을까?

준비물

  • 단말이나 에뮬레이터를 타겟으로 잘(!?) 빌드된 AOSP