Skip to content

Instantly share code, notes, and snippets.

View gturedi's full-sized avatar

Gökhan Türedi gturedi

View GitHub Profile
anonymous
anonymous / -
Created March 9, 2017 23:25
System: Host: gs40 Kernel: 4.4.0-53-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Cinnamon 3.2.7 (Gtk 3.18.9-1ubuntu3.2) dm: mdm Distro: Linux Mint 18.1 Serena
Machine: Mobo: Micro-Star model: MS-14A2 v: REV:1.0
Bios: American Megatrends v: E14A2IMS.103 date: 04/19/2016
CPU: Quad core Intel Core i7-6700HQ (-HT-MCP-) cache: 6144 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 20735
clock speeds: min/max: 800/3500 MHz 1: 2054 MHz 2: 1185 MHz 3: 803 MHz 4: 799 MHz 5: 803 MHz
6: 800 MHz 7: 800 MHz 8: 830 MHz
Graphics: Card-1: Intel Skylake Integrated Graphics bus-ID: 00:02.0 chip-ID: 8086:191b
Card-2: NVIDIA GM107M [GeForce GTX 960M] bus-ID: 01:00.0 chip-ID: 10de:139b
@jgilfelt
jgilfelt / CurlLoggingInterceptor.java
Created January 9, 2016 15:34
An OkHttp interceptor that logs requests as curl shell commands
/*
* Copyright (C) 2016 Jeff Gilfelt.
*
* 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
@mcginty
mcginty / material_colors.xml
Last active March 17, 2022 04:09
Android XML resource with the full material color palette. Source: http://www.google.com/design/spec/style/color.html#color-color-palette
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="material_red50">#ffffebee</color>
<color name="material_red100">#ffffcdd2</color>
<color name="material_red200">#ffef9a9a</color>
<color name="material_red300">#ffe57373</color>
<color name="material_red400">#ffef5350</color>
<color name="material_red500">#fff44336</color>
<color name="material_red600">#ffe53935</color>
<color name="material_red700">#ffd32f2f</color>
@JMPergar
JMPergar / ScrollViewWithMaxHeight.java
Created November 5, 2014 13:28
ScrollView that can be configured with max height
public class ScrollViewWithMaxHeight extends ScrollView {
public static int WITHOUT_MAX_HEIGHT_VALUE = -1;
private int maxHeight = WITHOUT_MAX_HEIGHT_VALUE;
public ScrollViewWithMaxHeight(Context context) {
super(context);
}
@donnfelker
donnfelker / CircularTransformation.java
Last active December 2, 2020 20:47
Picasso and CircularTransform Example
import android.graphics.*;
import com.squareup.picasso.Transformation;
/**
* Transforms an image into a circle representation. Such as a avatar.
*/
public class CircularTransformation implements Transformation
{
int radius = 10;
@chrisbanes
chrisbanes / FloatLabelLayout.java
Last active March 15, 2024 06:39
FloatLabelLayout
/*
* Copyright 2014 Chris Banes
*
* 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
@MarsVard
MarsVard / README
Last active November 3, 2022 19:19
android drawable to imitate google cards.
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"