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
LalitMaganti / main.c
Created Jan 2, 2020
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
LalitMaganti / top_five_processes.proto
Created May 30, 2019
Perfetto Metrics Platform (demo)
View top_five_processes.proto
// Copyright 2019 Google LLC.
// SPDX-License-Identifier: Apache-2.0
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
package perfetto.protos;
import "perfetto/metrics/metrics.proto";
@LalitMaganti
LalitMaganti / NavigationDrawerViewMaterial.md
Last active Sep 29, 2018
Material Design Navigation Items with NavigationView
View NavigationDrawerViewMaterial.md

#####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 (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:
View 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/" />
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/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