Skip to content

Instantly share code, notes, and snippets.

View anudit's full-sized avatar
🤌
Breaking and Buidling

Anudit Nagar anudit

🤌
Breaking and Buidling
View GitHub Profile
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@arshpreetsingh
arshpreetsingh / flask_parallel.py
Created October 3, 2017 12:52
run flask in parallel using thread pool executor
from flask import Flask
from time import sleep
from concurrent.futures import ThreadPoolExecutor
# DOCS https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.ThreadPoolExecutor
executor = ThreadPoolExecutor(2)
app = Flask(__name__)
@adamblvck
adamblvck / withAndroidMainActivityAttributes.js
Created March 2, 2023 11:23
Expo Plugin for enabling `android:largeHeap` flag in AndroidManifest, allowing one to process more data in memory (useful when reading large JSON files).
const { withAndroidManifest } = require("@expo/config-plugins");
module.exports = function androiManifestPlugin(config) {
return withAndroidManifest(config, async (config) => {
let androidManifest = config.modResults.manifest;
androidManifest.application[0].$["android:largeHeap"] = "true";
return config;
});