Skip to content

Instantly share code, notes, and snippets.

@jezell
jezell / memory_monitor.dart
Created June 1, 2024 01:06
Memory Monitor
import "package:flutter/material.dart";
import "package:google_fonts/google_fonts.dart";
import "memory_usage.dart" if (dart.library.html) 'memory_usage_web.dart';
import "dart:async";
const showMemMonitor = bool.fromEnvironment("SHOW_MEM_MONITOR");
class MemoryMonitor extends StatefulWidget {
const MemoryMonitor({super.key});
// Copyright 2019 the Dart project authors. 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(const MyApp());
class CenteredText extends StatelessWidget {
const CenteredText(this.text, {super.key, required this.style});
// Copyright 2019 the Dart project authors. 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(const MyApp());
class CenteredText extends StatelessWidget {
const CenteredText(this.text, {super.key, required this.style});
.slide-in {
animation: slide-in .5s forwards;
overflow: hidden;
}
@keyframes slide-in {
from {
max-height: 0px;
}
@jezell
jezell / kubernetes-websocket.go
Created September 25, 2016 08:04
Connect to Kubernetes endpoint over websockets
package main
import (
"bytes"
"flag"
"golang.org/x/net/websocket"
"io"
"k8s.io/client-go/1.4/rest"
"k8s.io/client-go/1.4/tools/clientcmd"
"log"
function hello() {
}
@jezell
jezell / gist:4498389
Last active December 10, 2015 21:58
auto resize
/**
* @license wysihtml5 v0.3.0
* https://github.com/xing/wysihtml5
*
* Author: Christopher Blum (https://github.com/tiff)
*
* Copyright (C) 2012 XING AG
* Licensed under the MIT license (MIT)
*
*/
public class SubscriptionExtension : IExtension<ServiceHostBase>
{
public SubscriptionExtension(SubscriptionEndpoint subscription)
{
Subscription = subscription;
}
#region IExtension<ServiceHostBase> Members
public void Attach(ServiceHostBase owner)
public class WcfManagementService : RuntimeService
{
protected override void OnStart()
{
base.OnStart();
_host = new ServiceHost(new ServiceBusManagementService(Runtime));
_host.Open();
}
public class PerformanceMonitorRuntimeService : RuntimeService
{
public PerformanceMonitorRuntimeService() : this (null, null)
{
}
public PerformanceMonitorRuntimeService(string instanceName, string categoryName)
{
if (instanceName == null)
{
instanceName = "Default Instance";