Skip to content

Instantly share code, notes, and snippets.

View flaviocdc's full-sized avatar

Flávio Coutinho da Costa flaviocdc

  • Microsoft
  • Greater Seattle Area
  • 04:36 (UTC -07:00)
View GitHub Profile
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<!-- ===================================================================== -->
<!-- -->
<!-- Log4j Configuration -->
<!-- -->
<!-- ===================================================================== -->
<!-- $Id: jboss-log4j.xml 83 2009-03-03 22:47:30Z flavio $ -->
@flaviocdc
flaviocdc / gist:1007673
Created June 4, 2011 06:44
What I had to change in order to make kernelzilla's tree build
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 952d3fb..7080a09 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -52,7 +52,12 @@ BOARD_HAVE_BLUETOOTH_BCM := true
# accel/gps
BOARD_VENDOR_USE_AKMD := akm8973
-BOARD_GPS_LIBRARIES := libgps
+# GPS
@flaviocdc
flaviocdc / PhoneWindowManager.java
Created June 15, 2011 02:46
Motorola's readLidState()
void readLidState()
{
int k;
while (true)
{
try
{
int i = this.mWindowManager.getSwitchState(0);
if (mTableTopModeSupport)
continue;
@flaviocdc
flaviocdc / gist:1026474
Created June 15, 2011 04:19
Motorola's readLidState() smali
.method readLidState()V
.locals 6
.prologue
const/4 v5, 0x1
const/4 v4, 0x0
.line 817
:try_start_0
@flaviocdc
flaviocdc / manifests.xml.diff
Created July 4, 2011 03:05
manifests.xml.diff
diff --git a/default.xml b/default.xml
index 9afc1a1..eb154a8 100644
--- a/default.xml
+++ b/default.xml
@@ -20,7 +20,7 @@
<project path="bionic" name="CyanogenMod/android_bionic" remote="github" />
<project path="bootable/bootloader/legacy" name="platform/bootable/bootloader/legacy" />
<project path="bootable/diskinstaller" name="platform/bootable/diskinstaller" />
- <project path="bootable/recovery" name="CyanogenMod/android_bootable_recovery" remote="github" />
+ <project path="bootable/recovery" name="j-r0dd/android_bootable_recovery" remote="github" />
/*
** Copyright 2008, Google Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
@flaviocdc
flaviocdc / pianobar-mediakeys.py
Created March 13, 2012 23:59
Quick python script to handle media keys for pianobar
#!/usr/bin/env python
import gobject
import dbus
import dbus.service
import dbus.mainloop.glib
import os.path
APP_ID="pianobar-mediakeys"
pianobar_key_bindings = {}
#!/usr/bin/python2
import sys
for line in sys.stdin:
for s in line.split(" "):
if s.startswith("$(") and s.endswith(")"):
print s
@flaviocdc
flaviocdc / smoke-test.py
Created May 8, 2012 22:57
Testando modelo #1
#!/usr/bin/python
from django.core.management import setup_environ
from people import settings
setup_environ(settings)
from people.models import *
usuario = Usuario(email = "flavio.cdc@gmail.com")
usuario.save()
@flaviocdc
flaviocdc / ia.pl
Created December 2, 2012 21:55
IA - Prolog
% slides
member(X, [X|_]) :- !.
member(X,[_|Y]) :- member(X,Y).
append([], L, L).
append([X|L1], L2, [X|L3]) :- append(L1, L2, L3).
add(X, L, [X|L]).
del(X, [X|Tail], Tail).