Skip to content

Instantly share code, notes, and snippets.

View angad's full-sized avatar

Angad Singh angad

View GitHub Profile
@angad
angad / setvsarray.py
Created September 11, 2014 08:14
user_dict.py
from array import array
users = {}
for user in range(50 * 1000 * 1000):
if user % 1000000 == 0:
print user
s = array('h')
for day in range(28):
s.append(day)
@angad
angad / designer.html
Last active August 29, 2015 14:13
designer
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
<polymer-element name="my-element">
<template>
@angad
angad / crash
Created March 21, 2015 08:56
telegram crash 10.7.5
Process: Telegram [635]
Path: /Applications/Telegram.app/Contents/MacOS/Telegram
Identifier: ru.keepcoder.Telegram
Version: 1.39 (15576)
App Item ID: 747648890
App External ID: 811906577
Code Type: X86-64 (Native)
Parent Process: launchd [290]
Date/Time: 2015-03-21 16:51:55.271 +0800
@angad
angad / umit.portfile
Created April 24, 2011 21:13
Umit 1.0 Portfile
# $Id: Portfile 51955 2009-06-07 10:04:10Z arthurk@macports.org $
PortSystem 1.0
PortGroup python26 1.0
name umit
version 1.0
revision 1
epoch 1
categories net
@angad
angad / Android.mk
Created May 11, 2011 13:17
libpcap android
#LOCAL_PATH := $(call my-dir)
LOCAL_PATH := ./jni
include $(CLEAR_VARS)
LOCAL_MODULE := libpcap-t
LOCAL_SRC_FILES := libpcap-native.c
LOCAL_C_INCLUDES := $(NDK_ROOT)/external/libpcap
@angad
angad / libpcap_debug.log
Created May 11, 2011 15:12
libpcap crash log
.
.
.
.
D/dalvikvm( 9630): GC_EXPLICIT freed 39 objects / 1936 bytes in 1004ms
D/dalvikvm( 102): GC_EXPLICIT freed 14083 objects / 797472 bytes in 347ms
I/installd( 74): unlink /data/dalvik-cache/data@app@com.umit.android.libpcap-1.apk@classes.dex
D/AndroidRuntime(10099): Shutting down VM
I/AndroidRuntime(10099): NOTE: attach of thread 'Binder Thread #3' failed
D/dalvikvm(10099): Debugger has detached; object registry had 1 entries
@angad
angad / libpcap-native.c
Created May 11, 2011 15:13
Native JNI libpcap
#include <jni.h>
#include <string.h>
#include <android/log.h>
#include <pcap.h>
#define DEBUG_TAG "Sample_LIBPCAP_DEBUGGING"
void Java_com_umit_android_libpcap_libpcap_testLog(JNIEnv * env, jobject this, jstring logThis)
{
jboolean isCopy;
@angad
angad / gist:968486
Created May 12, 2011 13:30
ndk-build logs
Angad-Singhs-MacBook:libpcaptest angadsg$ ~/android-ndk-r5b/ndk-build
Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
Gdbsetup : libs/armeabi/gdb.setup
Compile thumb : pcaptest <= libpcap-native.c
Compile thumb : pcap <= bpf_dump.c
Compile thumb : pcap <= bpf_filter.c
Compile thumb : pcap <= bpf_image.c
Compile thumb : pcap <= etherent.c
Compile thumb : pcap <= fad-gifc.c
Compile thumb : pcap <= gencode.c
I/ActivityManager( 102): Start proc org.umit.android.libpcaptest for activity org.umit.android.libpcaptest/.libpcaptest: pid=24234 uid=10134 gids={}
W/ResourceType( 223): getEntry failing because entryIndex 638 is beyond type entryCount 112
W/ResourceType( 223): Failure getting entry for 0x7f02027e (t=1 e=638) in package 0: 0x80000001
W/ResourceType( 102): Skipping entry 0x7f040007 in package table 0 because it is not complex!
W/ResourceType( 102): Skipping entry 0x7f040008 in package table 0 because it is not complex!
W/ResourceType( 223): getEntry failing because entryIndex 335 is beyond type entryCount 112
W/ResourceType( 223): Failure getting entry for 0x7f02014f (t=1 e=335) in package 0: 0x80000001
W/dalvikvm(24234): Exception Ljava/lang/UnsatisfiedLinkError; thrown during Lorg/umit/android/libpcaptest/libpcaptest;.<clinit>
W/dalvikvm(24234): Class init failed in newInstance call (Lorg/umit/android/libpcaptest/libpcaptest;)
D/AndroidRuntime(24234): Shutting down VM
D/AndroidRuntime( 574): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 574): CheckJNI is ON
D/AndroidRuntime( 574): --- registering native functions ---
D/AndroidRuntime( 574): Shutting down VM
D/dalvikvm( 574): Debugger has detached; object registry had 1 entries
I/AndroidRuntime( 574): NOTE: attach of thread 'Binder Thread #3' failed
D/AndroidRuntime( 582):
D/AndroidRuntime( 582): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 582): CheckJNI is ON
D/AndroidRuntime( 582): --- registering native functions ---