Skip to content

Instantly share code, notes, and snippets.

View cristiangu's full-sized avatar

Cristian Gutu cristiangu

View GitHub Profile
import android.app.Activity
import android.graphics.Rect
import android.os.Build
import android.view.View
import android.view.ViewTreeObserver
import android.view.inputmethod.InputMethodManager
/**
* Created by mikepenz on 14.03.15.
* This class implements a hack to change the layout padding on bottom if the keyboard is shown
@robinheinze
robinheinze / multi-column-section-list-example.md
Last active March 14, 2024 15:09
Multi-column SectionList using FlatList

First, let's assemble the data. Say we have two sets of objects: Fruits and Vegetables.

const fruits = [
  {
    name: 'Apple',
    color: 'Green'
  },
  {
    name: 'Banana',
@candostdagdeviren
candostdagdeviren / Dangerfile
Last active February 1, 2023 10:40
Sample Dangerfile for iOS Project
# PR is a work in progress and shouldn't be merged yet
warn "PR is classed as Work in Progress" if github.pr_title.include? "[WIP]"
# Warn when there is a big PR
warn "Big PR, consider splitting into smaller" if git.lines_of_code > 500
# Ensure a clean commits history
if git.commits.any? { |c| c.message =~ /^Merge branch '#{github.branch_for_base}'/ }
fail "Please rebase to get rid of the merge commits in this PR"
end
@chourobin
chourobin / 0-bridging-react-native-cheatsheet.md
Last active June 28, 2024 20:49
React Native Bridging Cheatsheet
@stkent
stkent / android_studio_shortcuts.md
Last active June 2, 2024 09:29
Android Studio Shortcuts (Mac)

Android Studio Shortcuts (Mac)

Notes:

  • Two of the most useful shortcuts utilize the Fn (function) keys. It is therefore recommended that you enable the "Use all F1, F2, etc. keys as standard function keys" option [System Preferences > Keyboard].
  • Be sure to enable the Mac OS X 10.5+ keymap in Android Studio [Preferences > Keymap].
  • A fairly complete shortcut list can be found here.

Useful symbols:

@suanmiao
suanmiao / gist:0c8699e0d07c7c1880fd
Created June 6, 2014 12:20
BTC Mining Calculator

BitCoin Mining Calcuator

  • Code:

      float price =nowBean.getPrice();  
      float elecPriceFloat = nowBean.getElecPrice(); 
      float deviceCostFloat = nowBean.getDeviceCost();
      float currency = nowBean.getCurrency();
      String unitString = "";