Skip to content

Instantly share code, notes, and snippets.

View b099l3's full-sized avatar
🏃‍♂️

Iain Smith b099l3

🏃‍♂️
View GitHub Profile
@gaetschwartz
gaetschwartz / settings.json
Last active May 9, 2024 07:21
Nest files in Flutter projects on VSCode, inspired from https://github.com/antfu/vscode-file-nesting-config
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.expand": false,
"explorer.fileNesting.patterns": {
"pubspec.yaml": ".flutter-plugins, .packages, .dart_tool, .flutter-plugins-dependencies, .metadata, .packages, pubspec.lock, build.yaml, analysis_options.yaml, all_lint_rules.yaml",
".gitignore": ".gitattributes, .gitmodules, .gitmessage, .mailmap, .git-blame*",
"readme.*": "authors, backers.md, changelog*, citation*, code_of_conduct.md, codeowners, contributing.md, contributors, copying, credits, governance.md, history.md, license*, maintainers, readme*, security.md, sponsors.md",
"*.dart": "$(capture).g.dart, $(capture).freezed.dart",
},
@jaredpalmer
jaredpalmer / MarkdownPage.tsx
Created February 17, 2021 13:52
Get headers from MDX in Next.js
import {MDXProvider} from '@mdx-js/react';
import {MDXComponents} from 'components/MDX/MDXComponents';
import {Toc} from 'components/Toc/Toc';
import * as React from 'react';
export interface MarkdownProps<Frontmatter> {
meta: Frontmatter;
children?: React.ReactNode;
}
@RabiRoshan
RabiRoshan / RefreshIndicatorExample.dart
Created April 28, 2020 12:43
Refresh Indicator between SliverAppBar and SliverList (Like Instagram refresh) in Flutter
CustomScrollView(
physics:
const BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
slivers: <Widget>[
SliverAppBar(
title: Text(
"Example",
style: heading1,
),
floating: true,

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

// Unity C# Cheat Sheet
// I made these examples for students with prior exerience working with C# and Unity.
// Too much? Try Unity's very good tutorials to get up to speed: https://unity3d.com/learn/tutorials/topics/scripting
@lopspower
lopspower / README.md
Last active July 26, 2024 10:25
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@cabeca
cabeca / simulator_populator_xcode7
Last active April 16, 2020 09:18
This script removes and recreates all simulators in Xcode 7.
#!/usr/bin/env ruby
require 'JSON'
device_types = JSON.parse `xcrun simctl list -j devicetypes`
runtimes = JSON.parse `xcrun simctl list -j runtimes`
devices = JSON.parse `xcrun simctl list -j devices`
devices['devices'].each do |runtime, runtime_devices|
runtime_devices.each do |device|
@geirsagberg
geirsagberg / SubscriptionManager.cs
Created September 24, 2015 08:31
MvvmCross SubscriptionManager
public class SubscriptionManager
{
private Dictionary<Type, MvxSubscriptionToken> subscriptions = new Dictionary<Type, MvxSubscriptionToken>();
public IMvxMessenger Messenger { get; set; }
public SubscriptionManager(IMvxMessenger messenger)
{
Messenger = messenger;
}
@softlion
softlion / MvxNetworkActivityIndicatorTargetBinding.cs
Created April 6, 2015 09:16
MvxNetworkActivityIndicatorTargetBinding for mvvmcross iOS
public abstract class MvxTargetBinding2 : MvxBinding, IMvxTargetBinding
{
private readonly object _target;
protected MvxTargetBinding2(object target)
{
_target = target;
}
protected object Target
@geirsagberg
geirsagberg / StoryBoardContainer.cs
Last active November 19, 2015 12:02
MvvmCross load views from Storyboards using a custom attribute
public class StoryBoardContainer : MvxTouchViewsContainer
{
protected override IMvxTouchView CreateViewOfType(Type viewType, MvxViewModelRequest request)
{
var storyboardAttribute = viewType.GetCustomAttribute<FromStoryboardAttribute>();
if (storyboardAttribute != null) {
var storyboard = UIStoryboard.FromName(storyboardAttribute.StoryboardName ?? viewType.Name, null);
var viewController = storyboard.InstantiateViewController(viewType.Name);
return (IMvxTouchView) viewController;
}