Skip to content

Instantly share code, notes, and snippets.

View Johnyoat's full-sized avatar
🌱
Progress

Osei Yeboah Johnson Johnyoat

🌱
Progress
View GitHub Profile
@alexedwards
alexedwards / cache.go
Last active April 10, 2024 00:53
Generic in-memory cache implementation in Go
package cache
import (
"sync"
"time"
)
// Cache is a basic in-memory key-value cache implementation.
type Cache[K comparable, V any] struct {
items map[K]V // The map storing key-value pairs.
//
// GradientView.swift
// Aura
//
// Created by Egor Sakhabaev on 23.07.17.
// Copyright © 2017 Egor Sakhabaev. All rights reserved.
//
import UIKit
@gokulkrishh
gokulkrishh / media-query.css
Last active May 4, 2024 16:17
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
@jasco
jasco / DialogFragAnim_snippet.java
Created October 5, 2014 00:26
DialogFragment enter/exit animations
// example courtesy of http://adilatwork.blogspot.com/2012/11/android-dialogfragment-enter-and-exit.html
// file location: src/main/java/com/example/
@Override
public void onStart() {
super.onStart();
// safety check
if (getDialog() == null) {
return;