Skip to content

Instantly share code, notes, and snippets.

View the-dagger's full-sized avatar
🚀
To Boldly Go Where No Man Has Gone Before

Harshit Dwivedi the-dagger

🚀
To Boldly Go Where No Man Has Gone Before
View GitHub Profile
@gokulkrishh
gokulkrishh / media-query.css
Last active April 26, 2024 10:32
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
@staltz
staltz / introrx.md
Last active April 25, 2024 04:18
The introduction to Reactive Programming you've been missing
@yqritc
yqritc / gist:ccca77dc42f2364777e1
Last active March 29, 2024 10:25
Equal column spacing for Android RecyclerView GridLayoutManager by using custom ItemDecoration

ItemOffsetDecoration

public class ItemOffsetDecoration extends RecyclerView.ItemDecoration {

    private int mItemOffset;

    public ItemOffsetDecoration(int itemOffset) {
        mItemOffset = itemOffset;
    }
@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>
@genekogan
genekogan / scrapeImages.py
Created February 22, 2017 11:49
scraping full size images from Google Images
from bs4 import BeautifulSoup
import requests
import re
import urllib2
import os
import argparse
import sys
import json
# adapted from http://stackoverflow.com/questions/20716842/python-download-images-from-google-image-search
@cjus
cjus / jsonval.sh
Created June 26, 2011 17:42
Extract a JSON value from a BASH script
#!/bin/bash
function jsonval {
temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $prop`
echo ${temp##*|}
}
json=`curl -s -X GET http://twitter.com/users/show/$1.json`
prop='profile_image_url'
picurl=`jsonval`
@TomTasche
TomTasche / AndroidManifest.xml
Last active May 11, 2023 20:00
OAuth flow using the AccountManager on Android
<!-- ... -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<!-- ... -->
@commonsguy
commonsguy / LICENSE
Last active December 11, 2022 16:33
deaar: Convert Android AAR Artifacts Into Library Projects
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
@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);
@arriolac
arriolac / Android Studio Tricks.md
Last active January 28, 2022 02:40
Some Android Studio Tricks.

Android Studio Notes

Android Studio keyboard shortcuts I use often.

Keyboard Shortcuts for Mac

  • SHIFT + F6 to refactor methods, classes, and variable names
  • CTRL + O to override methods
  • COMMAND + N
    • Generate getter, setter, and constructor method for a class (when in editor pane)