Skip to content

Instantly share code, notes, and snippets.

Avatar
👾
focusing on flutter cross platform mobile dev

Fred Grott fredgrott

👾
focusing on flutter cross platform mobile dev
View GitHub Profile
View switching theme without any library.
void main() {
runApp(_SwitchingThemeApp());
}
/// Properties that help me keep track of the example being run.
bool _useMaterial = false;
class _SwitchingThemeApp extends StatefulWidget {
@override
_SwitchingThemeAppState createState() => _SwitchingThemeAppState();
@joyrexus
joyrexus / README.md
Last active Sep 25, 2020
collapsible markdown
View README.md

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@dekalo-stanislav
dekalo-stanislav / versioning.gradle
Created Mar 21, 2017
Semantic Versioning for android application
View versioning.gradle
/**
* Will generate versionCode from versionName that follows Semantic Versioning
*/
ext {
/**
* Application version is located version variable.
* And should follow next policy:
* X1.X2.X3-type-flavor, where X - any digits and type is optional alphabetical suffix.
* X1 - major version
* X2 - minor version
@Nilzor
Nilzor / And-Record.ps1
Created Jan 5, 2016
Android screenshot and video grab helper script for PowerShell
View And-Record.ps1
<#
.SYNOPSIS
Records a video to a temp file on the device then downloads to local system and deletes temp file.
.PARAMETER DestFile
Destination path and file on local file system
.NOTES
Author : Frode Nilsen <nilzor@gmail.com>
.EXAMPLE
And-Record c:\temp\video.mp4
.LINK #>
@adamdehaven
adamdehaven / bgimage.css
Last active Aug 25, 2020
Bootstrap full-width hero section with text and image
View bgimage.css
.bgimage {
width:100%;
height:500px;
background: url('https://images.unsplash.com/photo-1438109491414-7198515b166b?q=80&fm=jpg&s=cbdabf7a79c087a0b060670a6d79726c');
background-repeat: no-repeat;
background-position: center;
background-size:cover;
background-attachment: fixed;
}
.bgimage h5 {
View SystemUiHelper.java
/*
* Copyright (C) 2014 The Android Open Source Project
*
* 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
@dmarcato
dmarcato / strip_play_services.gradle
Last active Sep 15, 2020
Gradle task to strip unused packages on Google Play Services library
View strip_play_services.gradle
def toCamelCase(String string) {
String result = ""
string.findAll("[^\\W]+") { String word ->
result += word.capitalize()
}
return result
}
afterEvaluate { project ->
Configuration runtimeConfiguration = project.configurations.getByName('compile')
View gist:74d265e90ef670b42121
/*
* Copyright 2013 Square 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
@salcode
salcode / .gitignore
Last active Sep 24, 2020
.gitignore file for a general web project - Bare Minimum Git
View .gitignore
# -----------------------------------------------------------------
# .gitignore
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20181206
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/10017553/raw/.gitignore
# to download this file
#
@MarsVard
MarsVard / README
Last active Jun 22, 2020
android drawable to imitate google cards.
View README
put card.xml in your drawables directory, put colors.xml in your values directory or add the colors to your colors.xml file.
set the background of a view to card,
as you can see in card.xml the drawable handles the card margin, so you don't have to add a margin to your view
``` xml
<View
android:layout_width="fill_parent"
You can’t perform that action at this time.