Skip to content

Instantly share code, notes, and snippets.

@ibraheem4
ibraheem4 / postgres-brew.md
Last active May 8, 2024 14:30 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@Pulimet
Pulimet / AdbCommands
Last active May 9, 2024 17:19
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@hartmannr76
hartmannr76 / README.md
Last active October 23, 2023 20:10
Flyway/Postgres Migration with Docker

Running

docker-compose -f docker-compose.migration.yml run flyway /opt/scripts/migrate.sh

#!/bin/bash
#this is a small script which updates Android SDK from command line.
#Needs to be executed from Android SDK root
( sleep 5 && while [ 1 ]; do sleep 1; echo y; done ) | tools/bin/sdkmanager \
"tools" \
"platform-tools" \
"platforms;android-25" \
"build-tools;25.0.1" \
@riggaroo
riggaroo / AndroidManifest.xml
Created April 13, 2016 17:31
Custom Android Espresso Test Runner - Unlocking a Device, Granting Permission to turn animations off, turning the Screen on.
<?xml version="1.0" encoding="utf-8"?>
<!-- Put this file in the "debug" folder so it only gets merged into debug builds -->
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="org.bookdash.android">
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<!-- Disable animations on debug builds so that the animations do not interfere with Espresso
@erseno
erseno / PagedRecyclerViewAdapter.java
Last active April 21, 2020 07:55
A base adapter for RecyclerView to handle the loading of more data once a scroll threshold has been reached. Also shows a progress bar as a footer view to show that the next page is loading. If the next page fails to load, a retry button is displayed along with an error message so that the page can be retried.
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import java.util.ArrayList;
/**
@remibantos
remibantos / microservices.md
Last active February 26, 2023 10:00
Microservices - Cheat sheet

Microservices - Cheat sheet

Based on Microservices presentation by Martin Fowler recorded at GOTO Berlin 2014.

Common caracteristics

  1. Components (= independently upgradable, replaçable) communicating through services (instead of libs for monoliths)
  2. Organized around business capabilities
  3. Smart endpoints and dumb pipes
  4. Decentralized data management
@tatocaster
tatocaster / RealPathUtil.java
Last active May 5, 2024 16:59
Real Path Utility class for Android, works for all API
public class RealPathUtil {
public static String getRealPath(Context context, Uri fileUri) {
String realPath;
// SDK < API11
if (Build.VERSION.SDK_INT < 11) {
realPath = RealPathUtil.getRealPathFromURI_BelowAPI11(context, fileUri);
}
// SDK >= 11 && SDK < 19
else if (Build.VERSION.SDK_INT < 19) {
@artem-zinnatullin
artem-zinnatullin / build.gradle
Last active December 1, 2020 17:54
Ignore particular buildType in Android Project
// Variant 1: For app or library project's build.gradle
android {
variantFilter {
if (it.buildType.name.equals('debug')) {
it.ignore = true
}
}
}
// Variant 2: For root build.gradle with applying only to library projects
@rock3r
rock3r / giffify.py
Last active January 14, 2022 09:00
Giffify - easily create optimised GIFs from a video
#!/usr/bin/python
# License for any modification to the original (linked below):
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# Sebastiano Poggi and Daniele Conti wrote this file. As long as you retain
# this notice you can do whatever you want with this stuff. If we meet some day,
# and you think this stuff is worth it, you can buy us a beer in return.
import argparse, sys, subprocess, tempfile