Skip to content

Instantly share code, notes, and snippets.

View dreamer2q's full-sized avatar
💭
I may be slow to respond.

Jack Li dreamer2q

💭
I may be slow to respond.
View GitHub Profile
@craiglabenz
craiglabenz / chat_message_render_box.dart
Last active April 23, 2024 18:28
Demonstrates a custom RenderObject that draws chat messages like WhatsApp, where the `sentAt` timestamp is tucked into the last line if it fits
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@rupeshtiwari
rupeshtiwari / main.yaml
Created March 30, 2021 15:01
cache node_modules in github workflow
name: Caching npm packages
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
import 'package:flutter/material.dart';
import 'dart:math' as math;
import 'dart:async';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
@fotock
fotock / nginx.conf
Last active March 21, 2024 07:43 — forked from plentz/nginx.conf
Nginx SSL 安全配置最佳实践.
# 生成 dhparam.pem 文件, 在命令行执行任一方法:
# 方法1: 很慢
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
# 方法2: 较快
# 与方法1无明显区别. 2048位也足够用, 4096更强
openssl dhparam -dsaparam -out /etc/nginx/ssl/dhparam.pem 4096
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active April 21, 2024 20:11
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line