Skip to content

Instantly share code, notes, and snippets.

View gohlinka2's full-sized avatar

František Hlinka gohlinka2

  • Fireball Inc.
  • Czech Republic
View GitHub Profile
@buntagonalprism
buntagonalprism / Dart Class.dart
Last active May 24, 2024 12:39
Flutter and Dart collection of file templates for Android Studio development
#set( $nameparts = $NAME.split("_"))
#set( $namepart = '')
#set( $classname = '')
#foreach( $namepart in $nameparts )
#set( $classname = $classname + $namepart.substring(0, 1).toUpperCase() + $namepart.substring(1))
#end
class $classname {
// TODO: add class properties and methods
@Ahmed-Abdelmeged
Ahmed-Abdelmeged / MainActivity.java
Last active July 13, 2023 05:46
Rounded Layout with specific corners rounded
package com.abdelmeged.ahmed.roundedlayout;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ImageView;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions;
public class MainActivity extends AppCompatActivity {
@tabrindle
tabrindle / webp-convert-directory.sh
Last active May 15, 2024 20:57
Convert all files in directory to webp, with default params, or standard cwebp params passed from command
#!/bin/bash
PARAMS=('-m 6 -q 70 -mt -af -progress')
if [ $# -ne 0 ]; then
PARAMS=$@;
fi
cd $(pwd)
@sromku
sromku / ImageScaleView.java
Created November 20, 2015 15:32
Image View Top Crop / Bottom Crop
/**
* Scale to center top or scale to center bottom
*
* @author sromku
*/
public class ImageScaleView extends ImageView {
private MatrixCropType mMatrixType = MatrixCropType.TOP_CENTER; // default
private enum MatrixCropType {