Skip to content

Instantly share code, notes, and snippets.

View angad's full-sized avatar

Angad Singh angad

View GitHub Profile
Daily Habit Environmental Factors Did it work?
Reduce Sugar intake No sweets/sugar at home Easy - Yes
Daily home cooked meals Fully stocked fridge with an inventory whiteboard Medium - Yes
Brushing teeth for atleast 120 seconds NO SOLUTION Nope
Daily Push Ups Push Up bars in living room Easy - Yes
Reduce Social Media Time Delete Instagram from phone & Separate Android tablet for Instagram Easy - Yes
Weekly Coursera course Separate Android Tablet for Coursera Hard - No
15 books in 2021 Always carry kindly Easy - Yes
Wake up at same time everyday Alexa alarm set for 7am everyday Hard - Kinda
Run twice a week Fitbit tracking and good shoes Medium - Yes
@angad
angad / facebook.txt
Last active March 22, 2018 16:24
facebook_pihole
apps.facebook.com
connect.facebook.net
facebook.com
fbcdn.com
fbsbx.com
fbcdn.net
graph.facebook.com
login.facebook.com
s-static.ak.facebook.com
static.ak.connect.facebook.com
@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 / 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 / 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 / pt.py
Last active June 16, 2021 02:21
Python concurrent.futures processes and threads example
import sys
import concurrent.futures
import random
import time
import math
from Queue import Queue
MAX_PROCESSES = 4
MAX_THREADS = 5
@angad
angad / gist:8166345
Created December 29, 2013 01:17
php call stack
private function get_callstack($delim="\n") {
$dt = debug_backtrace();
$cs = '';
foreach ($dt as $t) {
$cs .= $t['file'] . ' line ' . $t['line'] . ' calls ' . $t['function'] . "()" . $delim;
}
return $cs;
}
$ libtoolize --force
$ aclocal
$ autoheader
$ automake --force-missing --add-missing
$ autoconf
@angad
angad / gist:7089521
Created October 21, 2013 19:30
centerim-4.22.10 src/hooks/abstracthook.h patch
54a55,65
> enum logevent {
> logConnecting,
> logLogged,
> logSearchFinished,
> logPasswordChanged,
> logDisconnected,
> logContactAdd,
> logContactRemove,
> logConfMembers
gcc-4.2 -O2 -ggdb3 -DNDEBUG -Wall -fPIC -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -fno-stack-protector -march=core2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -c -MD -o heap.o heap.c
In file included from heap.c:6:
intern.h:231: error: expected declaration specifiers or ‘...’ before ‘fd_set’
intern.h:231: error: expected declaration specifiers or ‘...’ before ‘fd_set’
intern.h:231: error: expected declaration specifiers or ‘...’ before ‘fd_set’
intern.h:492: warning: parameter names (without types) in function declaration
In file included from ruby.h:702,
from heap.c:8:
intern.h:231: error: conflicting types for ‘rb_thread_select’
intern.h:231: error: previous declaration of ‘rb_thread_select’ was here