Skip to content

Instantly share code, notes, and snippets.

View sqlite-main.c
// 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 / main.c
Created January 2, 2020 15:04
SQLite vtable bug repro
View main.c
// 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 / top_five_processes.proto
Last active October 14, 2021 13:32
Perfetto Metrics Platform (demo)
View top_five_processes.proto
// Copyright 2019 Google LLC.
// SPDX-License-Identifier: Apache-2.0
syntax = "proto2";
package perfetto.protos;
import "protos/perfetto/metrics/metrics.proto";
message ProcessInfo {
LalitMaganti /
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.

View gist:f8a7f831bc04250e4b5c
### Keybase proof
I hereby claim:
* I am tilal6991 on github.
* I am 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 / default.xml
Created December 3, 2012 19:22
View default.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- Remotes -->
<remote name="aosp"
fetch="" />
<remote name="b2g"
fetch="git://" />
<remote name="mozilla"
fetch="git://" />
View gist:4113565
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
View gist:4068499
/usr/local/lib/python2.7/dist-packages/SQLAlchemy-0.7.9-py2.7.egg/sqlalchemy/ext/ 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 "", line 79, in <module>
File "", line 74, in run_server
server = tornado.httpserver.HTTPServer(Application(), extend_existing=True, xheaders=True)
File "", line 48, in __init__
init_database(create_engine(config.get('database', 'uri')))
File "/home/lalit/GetCM/getcm/model/", line 13, in init_database