Skip to content

Instantly share code, notes, and snippets.

// Copyright 2020 Google LLC.
// SPDX-License-Identifier: Apache-2.0
#include <sqlite3.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct Cursor {
sqlite3_vtab_cursor c;
@LalitMaganti
LalitMaganti / main.c
Created January 2, 2020 15:04
SQLite vtable bug repro
// Copyright 2019 Google LLC.
// SPDX-License-Identifier: Apache-2.0
#include <sqlite3.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct Cursor {
sqlite3_vtab_cursor c;
@LalitMaganti
LalitMaganti / top_five_processes.proto
Last active October 14, 2021 13:32
Perfetto Metrics Platform (demo)
// Copyright 2019 Google LLC.
// SPDX-License-Identifier: Apache-2.0
syntax = "proto2";
package perfetto.protos;
import "protos/perfetto/metrics/metrics.proto";
message ProcessInfo {
@LalitMaganti
LalitMaganti / NavigationDrawerViewMaterial.md
Last active September 29, 2018 00:23
Material Design Navigation Items with NavigationView

#####Problem: The NavigationView is an excellent component which simplifies much of the issues with generating a consistent and polished navigation drawer on Android. However, it does not quite follow the MD spec on how items should look

#####Solution: Create a couple of themes which sort this while maintaining backward compatibility to JB 4.2 (and further if you play around with fontFamily attribute). Note that you do need to have the support library v7 in your project for this to work without modifications - it requires the primary_text_default_material_light color from the library.

### Keybase proof
I hereby claim:
* I am tilal6991 on github.
* I am tilal6991 (https://keybase.io/tilal6991) on keybase.
* I have a public key whose fingerprint is B1BE 5F1E 9396 12B3 47AC A786 D7E3 5B67 4B78 3C1F
To claim this, I am signing this object:
@LalitMaganti
LalitMaganti / default.xml
Created December 3, 2012 19:22
default.xml
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- Remotes -->
<remote name="aosp"
fetch="https://android.googlesource.com/" />
<remote name="b2g"
fetch="git://github.com/mozilla-b2g/" />
<remote name="mozilla"
fetch="git://github.com/mozilla/" />
unzip $1 -d miuibase
unzip $2 -d rombase
cd miuibase/system/framework
apktool d framework-res.apk
rm framework-res.apk
sed -i 's/showNavigationBar">false/showNavigationBar">true/g' framework-res/res/values/bools.xml
apktool b framework-res framework-res.apk
rm framework-res.apk
apktool d framework.jar
rm framework.jar
/usr/local/lib/python2.7/dist-packages/SQLAlchemy-0.7.9-py2.7.egg/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'File' is already in the registry of this declarative base, mapped to <class 'model.schema.File'>
_as_declarative(cls, classname, cls.__dict__)
Traceback (most recent call last):
File "app.py", line 79, in <module>
run_server()
File "app.py", line 74, in run_server
server = tornado.httpserver.HTTPServer(Application(), extend_existing=True, xheaders=True)
File "app.py", line 48, in __init__
init_database(create_engine(config.get('database', 'uri')))
File "/home/lalit/GetCM/getcm/model/__init__.py", line 13, in init_database