Skip to content

Instantly share code, notes, and snippets.

View alana-mullen's full-sized avatar

Alana Mullen alana-mullen

  • Preston, UK
View GitHub Profile
@alana-mullen
alana-mullen / main.dart
Last active December 20, 2023 02:16
Flutter Adaptive AlertDialog
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const MaterialApp(
title: 'Flutter Adaptive AlertDialog Demo',
debugShowCheckedModeBanner: false,
@Piinks
Piinks / main.dart
Created August 9, 2023 18:29
New Slivers
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Seven different types of CSS attribute selectors
// This attribute exists on the element
[value]
// This attribute has a specific value of cool
[value='cool']
// This attribute value contains the word cool somewhere in it
[value*='cool']
@IanColdwater
IanColdwater / twittermute.txt
Last active November 17, 2024 02:37
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@DavidKuennen
DavidKuennen / minimal-analytics-snippet.js
Last active October 24, 2024 18:10
Minimal Analytics Snippet
(function (context, trackingId, options) {
const history = context.history;
const doc = document;
const nav = navigator || {};
const storage = localStorage;
const encode = encodeURIComponent;
const pushState = history.pushState;
const typeException = 'exception';
const generateId = () => Math.random().toString(36);
const getId = () => {
@MIvanchev
MIvanchev / article.md
Last active October 15, 2024 19:17
Ever wondered what it takes to run Windows software on ARM? Then this article might be for you!
<?php
/**
* Plugin Name: YOUR PLUGIN NAME
*/
include( dirname( __FILE__ ) . '/lib/requirements-check.php' );
$your_plugin_requirements_check = new YOUR_PREFIX_Requirements_Check( array(
'title' => 'YOUR PLUGIN NAME',
'php' => '5.4',
@florina-muntenescu
florina-muntenescu / BaseDao.kt
Last active October 11, 2024 01:20
Use Dao inheritance to reduce the amount of boilerplate code - https://medium.com/google-developers/7-pro-tips-for-room-fbadea4bfbd1
/*
* Copyright (C) 2017 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
@adavis
adavis / CommonExtensions.kt
Last active April 2, 2024 20:51
Common Android Extensions in Kotlin
fun View.visible() {
visibility = View.VISIBLE
}
fun View.invisible() {
visibility = View.INVISIBLE
}
fun View.gone() {
visibility = View.GONE
@urouro-net
urouro-net / .swift
Last active November 3, 2018 08:04
PHAsset Exif
let editOptions = PHContentEditingInputRequestOptions()
editOptions.isNetworkAccessAllowed = true
asset.requestContentEditingInput(with: editOptions) { (contentEditingInput: PHContentEditingInput?, info: [AnyHashable : Any]) in
if let fileURL = contentEditingInput?.fullSizeImageURL {
let image = CIImage(contentsOf: fileURL)
log.debug("properties=\(image?.properties)")
if let gps = image?.properties["{GPS}"] as? [AnyHashable : Any] {