Skip to content

Instantly share code, notes, and snippets.

View roma-sck's full-sized avatar
🏠
Working from home

Roman Fomenko roma-sck

🏠
Working from home
  • Ukraine, Dnipro
View GitHub Profile
@davidwparker
davidwparker / layout.xml
Created August 30, 2011 22:28
Android floating bottom row above soft keyboard
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_height="fill_parent"
android:layout_width="fill_parent">
<ScrollView
android:id="@+id/scrollview"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:layout_above="@+id/m_table_menu">
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@devunwired
devunwired / GifDecoder.java
Last active January 26, 2024 21:14
An optimized implementation of GifDecoder for Android devices.
/**
* Copyright (c) 2013 Xcellent Creations, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
@lecho
lecho / shadow.xml
Created September 7, 2013 07:01
Android shadow drawable xml.
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- Drop Shadow Stack -->
<item>
<shape>
<padding
android:bottom="1dp"
android:left="1dp"
android:right="1dp"
@ungoldman
ungoldman / curl_post_json.md
Last active July 7, 2024 17:56
post a JSON file with curl

How do you POST a JSON file with curl??

You can post a json file with curl like so:

curl -X POST -H "Content-Type: application/json" -d @FILENAME DESTINATION

so for example:

@zhdanovartur
zhdanovartur / SomeActivity.java
Last active February 16, 2023 22:06
Android EditText credit card formatting (mask)
package com.company;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
public class SomeActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
@mypplication
mypplication / UtilsUISystem.java
Created June 10, 2015 15:28
UtilsUISystem Android
import android.app.UiModeManager;
import android.content.Context;
import android.content.res.Resources;
import android.os.Build;
import android.util.Log;
import android.util.TypedValue;
import tv.recatch.library.R;
public class UtilsUISystem
@bmaupin
bmaupin / install-apktool.sh
Last active June 18, 2024 16:23
Install apktool in Linux
# ⚠ NOTE: if you're using the latest version of ubuntu, now you can just do:
# sudo apt install apktool
# Get latest version from https://bitbucket.org/iBotPeaches/apktool/downloads
export apktool_version=2.3.1
sudo -E sh -c 'wget https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_$apktool_version.jar -O /usr/local/bin/apktool.jar'
sudo chmod +r /usr/local/bin/apktool.jar
sudo sh -c 'wget https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool -O /usr/local/bin/apktool'
sudo chmod +x /usr/local/bin/apktool
@TheFinestArtist
TheFinestArtist / KeyboardUtil.java
Created September 24, 2015 11:07
KeyboardUtil.java
/*
* Copyright 2015 Mike Penz All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@lopspower
lopspower / README.md
Last active July 30, 2024 12:28
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store