Skip to content

Instantly share code, notes, and snippets.

@rtablada
rtablada / comic-book.md
Last active June 13, 2018 12:52
Hackathon Ideas

Comic Book Creator

Description

This application allows users to create basic storyboards for comic books or movies. Each comic books should have many tiles. A user should be able to manage (create, read, update, and destroy) comic book tiles. Users can go into "Dark Mode" so that the UI simplifies so that you can focus on reading/presenting your storyboard.

Deliverables

@ratpik
ratpik / MainActivity.java
Last active July 9, 2018 05:56
PayTM Android Integration
package com.drc.paytm_example;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.Window;
@dreikanter
dreikanter / get-hashtags.py
Created May 25, 2012 10:18
Extract hashtags from a string (w/o regexps) #python
text = """Sample #line of #text to demonstrate #hashtags
extraction. Here is some duplicate ones: #text #hashtags #tags."""
def get_hashtags(text, order=False):
tags = set([item.strip("#.,-\"\'&*^!") for item in text.split() if (item.startswith("#") and len(item) < 256)])
return sorted(tags) if order else tags
print "\n".join(get_hashtags(text, True))
@dmarcato
dmarcato / strip_play_services.gradle
Last active December 21, 2022 10:10
Gradle task to strip unused packages on Google Play Services library
def toCamelCase(String string) {
String result = ""
string.findAll("[^\\W]+") { String word ->
result += word.capitalize()
}
return result
}
afterEvaluate { project ->
Configuration runtimeConfiguration = project.configurations.getByName('compile')
@rosiehoyem
rosiehoyem / getting-started-with-airflow.md
Last active January 14, 2023 18:09
Getting Started With Airflow

Install Airflow

1. Install Airflow

Follow the installation instructions on the Airflow website.

Update Airflow Configurations

To configure Airflow to use Postgres rather than the default Sqlite3, go to airflow.cfg and update this configuration to LocalExecutor:

# The executor class that airflow should use. Choices include
@LoyEgor
LoyEgor / gulpfile.js
Last active March 13, 2023 17:22
best image compression settings (gulp-imagemin)
// install
// npm i gulp-cache gulp-imagemin imagemin-pngquant imagemin-zopfli imagemin-mozjpeg imagemin-giflossy -f
// node node_modules/jpegtran-bin/lib/install.js
// node node_modules/gifsicle/lib/install.js
// node node_modules/zopflipng-bin/lib/install.js
// node node_modules/mozjpeg/lib/install.js
// node node_modules/giflossy/lib/install.js
// node node_modules/pngquant-bin/lib/install.js
@grafikchaos
grafikchaos / Cherry Picking Multiple Commits.md
Last active October 9, 2023 17:30
Cherry pick multiple commits from a remote or upstream branch
@Aeonitis
Aeonitis / Android - Screen Overlay Detected Resolution
Last active October 28, 2023 06:05
Resolve Android 'Screen Overlay Detected' issue
Message of Issue: "Screen overlay detected - To change this permission setting you first have to turn off the screen overlay from Settings > Apps"
Scope of issue: This only applies to Android M (6.0/API v23) Or Over
Explanation: Other apps installed on the users device may be utilizing a screen overlay on your phone (e.g. Twilight, Red Moon, etc...)
Screen overlays are virtual layers that cover part or all of screen while another app is in the foreground.
It may be dangerous for android to allow you to to change a sensitive setting while an overlay is active because you may prone to 'tap-jacking'
(i.e. a malicious application displays a fake user interface that seems like it can be interacted with, but actually passes interaction events such as finger taps to a hidden user interface behind it.).
Therefore to improve security, android doesn't allow you to change sensitive settings while an active overlay is detected, unless the user permits the app to do so.
Source: https://commonsware.com/blog/2016/03/24/
@davidnunez
davidnunez / gist:1404789
Created November 29, 2011 13:20
list all installed packages in android adb shell
pm list packages -f