Skip to content

Instantly share code, notes, and snippets.

View lampione's full-sized avatar

Matteo Miceli lampione

View GitHub Profile
@aleksblago
aleksblago / Date-Select-Markup.html
Last active September 3, 2023 04:04
Markup: Select options for Month, Day, and Year.
<span>
<select name="month">
<option value="01">January</option>
<option value="02">February</option>
<option value="03">March</option>
<option value="04">April</option>
<option value="05">May</option>
<option value="06">June</option>
<option value="07">July</option>
<option value="08">August</option>
@skyfishjy
skyfishjy / CursorRecyclerViewAdapter.java
Last active December 16, 2023 08:55
CursorRecyclerViewAdapter
/*
* Copyright (C) 2014 skyfish.jy@gmail.com
*
* 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
@alexzaitsev
alexzaitsev / PhotosUriResolver.java
Last active January 18, 2024 21:13
Get image/video file path from New Google Photos app Uri
if (isNewGooglePhotosUri(uri)) {
String pathUri = uri.getPath();
String newUri = pathUri.substring(pathUri.indexOf("content"), pathUri.lastIndexOf("/ACTUAL"));
return getDataColumn(context, Uri.parse(newUri), null, null);
}
public static boolean isNewGooglePhotosUri(Uri uri) {
return "com.google.android.apps.photos.contentprovider".equals(uri.getAuthority());
}
@h4040
h4040 / home_page.dart
Created April 18, 2018 02:26
NewsReader
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'dart:convert';
import 'package:url_launcher/url_launcher.dart';
import 'package:intl/intl.dart';
import 'dart:async';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:share/share.dart' as sharing;
import 'package:transparent_image/transparent_image.dart';