Skip to content

Instantly share code, notes, and snippets.

View gpetuhov's full-sized avatar
💭
Working on a project

Gennadiy Petuhov gpetuhov

💭
Working on a project
View GitHub Profile
@leoloobeek
leoloobeek / get_gists.py
Created April 26, 2017 21:34
Download all gists for a specific user
# first: mkdir user && cd user && cp /path/to/get_gists.py .
# python3 get_gists.py user
import requests
import sys
from subprocess import call
user = sys.argv[1]
r = requests.get('https://api.github.com/users/{0}/gists'.format(user))
@cutiko
cutiko / LoginActivity.java
Last active August 29, 2022 14:53
How to customize firebase-ui-auth for Android
public class LoginActivity extends AppCompatActivity {
private static final int RC_SIGN_IN = 343;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
@lopspower
lopspower / README.md
Last active April 19, 2024 13:59
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

@daniellevass
daniellevass / android_material_design_colours.xml
Last active March 26, 2024 15:48
Android Material Design Colours
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- google's material design colours from
http://www.google.com/design/spec/style/color.html#color-ui-color-palette -->
<!--reds-->
<color name="md_red_50">#FFEBEE</color>
<color name="md_red_100">#FFCDD2</color>
<color name="md_red_200">#EF9A9A</color>
@romannurik
romannurik / CheatSheet.java
Last active May 16, 2023 13:42
Android helper class for showing cheat sheets (tooltips) for icon-only UI elements on long-press. This is already default platform behavior for icon-only action bar items and tabs. This class provides this behavior for any other such UI element.
/*
* Copyright 2012 Google Inc.
*
* 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
@mbostock
mbostock / .block
Last active March 1, 2024 06:07
The Gist to Clone All Gists
license: gpl-3.0