Skip to content

Instantly share code, notes, and snippets.

@uttaravadina
uttaravadina / gist:b914971c4471323f567f298ff320f24a
Created September 21, 2020 05:14 — forked from utsengar/gist:1329947
Object dump using gobjdump on Mac OSX
1. Write a hello hello world c
main( )
{
printf("Hello World\n");
}
2. Compile it: gcc hello.c
Bonus: `gcc -Wall -save-temps hello.c -o hello` will give you extra stuff like:
@uttaravadina
uttaravadina / Buildbot-Guide.txt
Created September 21, 2020 00:58 — forked from SwapnilSoni1999/Buildbot-Guide.txt
[GUIDE] ROM Compiling from source [Buildbot]
First of all have a brief look at xda threads about compiling rom from source dont follow all stuff from there tho.. just have a look on those threads specially that jackeagle thread.
now first what you need :
If on local
-> Fast internet connection (fast enough to download 50GB rom source without waiting for a day or two xD )
-> 4core cpu(or higher)
-> 8gb minimum ram
-> Linux (Ubuntu for this guide)
#!/bin/bash
#Ensure we have the quantity specified on the CLI
if [ -z "$3" ]; then ARG_ERR=ERR; fi
if [ -z "$2" ]; then ARG_ERR=ERR; fi
if [ -z "$1" ]; then ARG_ERR=ERR; fi
if [ -n "$ARG_ERR" ];
then
echo "Usage: <filecount> <filenamebase> <filenameextension>"
exit
#define __define_initcall(level,fn,id) \
static initcall_t __initcall_##fn##id __used \
__attribute__((__section__(".initcall" level ".init"))) = fn
#define core_initcall(fn) __define_initcall("1",fn,1)
#define subsys_initcall(fn) __define_initcall("4",fn,4)
#define late_initcall(fn) __define_initcall("7",fn,7)
/* trimmed, obviously... */
@uttaravadina
uttaravadina / 0-startup-overview.md
Created August 7, 2020 18:13 — forked from dideler/0-startup-overview.md
Startup Engineering notes
@uttaravadina
uttaravadina / BulletJournal.md
Created August 7, 2020 04:11 — forked from tmikeschu/BulletJournal.md
A brief intro to the bullet journal technique

The Way of the Bullet Journal

This technique is a tool. While I can't say the bullet journal is the best for everyone, I can say that learning to export data from your brain to other systems is essential for being a creative and productive human being. If you walk away from this unenthused by the bullet journal approach, I encourage you to still take seriously the habits it helps promote.

You are a student. You have code to write. Jobs to find. Bills to pay. Life to figure out. Friends and family to love and occasionally say hello to.

All this is to say: you have too much to do for your brain to handle all by itself.

There are many productivity tools that help alleviate overload of the brain. I do not promise this technique will save you, or even remotely help you, but I do promise to provide you with the information you need to get started and decide if it's right for you.

@uttaravadina
uttaravadina / notify-send-nox
Created July 22, 2020 20:59 — forked from smoser/notify-send-nox
send a message like notify-send without X
#!/bin/sh
# send a notify message without access to DISPLAY
# taken from src/notify-osd.xml in notify-osd and from example in gdbus(1)
# 'notify-send' requires 'DISPLAY' and access to other context
# this script does not
#
# **** UGH ****
# This depends on DBUS_SESSION_BUS_ADDRESS variable, which is still "per-session"
# so, in an environment where you have access to neither, you can't really do this.
#
@uttaravadina
uttaravadina / OverlayableContainerOnLongPress_sample.dart
Created July 18, 2020 17:08 — forked from boeledi/OverlayableContainerOnLongPress_sample.dart
How to display an overlay on top of a particular item, present in a Scroll Area, on longPress?
import 'package:flutter/material.dart';
import 'dart:math';
void main() {
///
/// Launch the application
///
runApp(Application());
}
@uttaravadina
uttaravadina / main.dart
Created July 2, 2020 00:33 — forked from sachaarbonel/main.dart
Flutter SVG Path Converter
// Generates canvas drawing commands from an SVG path string
import 'package:path_parsing/path_parsing.dart';
void main(List<String> args) {
if (args.length < 3) {
print('Usage: width height path_string');
return;
}
@uttaravadina
uttaravadina / build.gradle
Created June 23, 2020 13:59 — forked from jackgris/build.gradle
Example of use from Proguard, from Android Studio
buildscript {
repositories {
mavenCentral()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
classpath 'com.squareup.gradle:gradle-android-test-plugin:0.9.1-SNAPSHOT'