Skip to content

Instantly share code, notes, and snippets.

@putraxor
putraxor / flutter_chat_bubble.dart
Created March 5, 2018 02:19
Flutter Chat Bubble
import 'package:flutter/material.dart';
class Bubble extends StatelessWidget {
Bubble({this.message, this.time, this.delivered, this.isMe});
final String message, time;
final delivered, isMe;
@override
Widget build(BuildContext context) {
@knqyf263
knqyf263 / redis_test.go
Last active May 16, 2023 14:11
go-redis pipeline
func TestRedis(t *testing.T) {
s, _ := testutil.PrepareTestRedis()
for i := 0; i < 10000; i++ {
s.Set("key"+strconv.Itoa(i), "hoge"+strconv.Itoa(i))
}
client := redis.NewClient(&redis.Options{Addr: s.Addr()})
// 普通にループ
result := map[string]string{}
for i := 0; i < 10000; i++ {
@shubheksha
shubheksha / brackets-pair-colorizer.md
Last active May 1, 2023 18:05
A list of extensions/plugins that highlight matching parens/braces for various editors/IDEs.
@mildmojo
mildmojo / rotate_desktop.sh
Created June 18, 2014 06:47
Script to rotate the screen and touch devices on modern Linux desktops. Great for convertible laptops.
#!/bin/bash
#
# rotate_desktop.sh
#
# Rotates modern Linux desktop screen and input devices to match. Handy for
# convertible notebooks. Call this script from panel launchers, keyboard
# shortcuts, or touch gesture bindings (xSwipe, touchegg, etc.).
#
# Using transformation matrix bits taken from:
# https://wiki.ubuntu.com/X/InputCoordinateTransformation