Skip to content

Instantly share code, notes, and snippets.

View charleshan's full-sized avatar
🚀
Working on JoinCatchup.com

Charles Han charleshan

🚀
Working on JoinCatchup.com
View GitHub Profile
@jborichevskiy
jborichevskiy / jon-roam-daily-template.md
Last active August 31, 2022 04:41
The daily template I use for Roam Research https://roamresearch.com/
  • Weekly Agenda (created on a different day, and embedded with /Block Reference)
  • [[Morning Questions]]
    • {{[[slider]]}} How many hours of sleep did I get?
    • What's one thing top of mind today?
    • What's the one thing I need to get done today to make progress?
    • Review #[[Index: Questions]] #values
  • Agenda
    • {{[[TODO]]}} Morning walk #goal-health #habit
    • {{[[TODO]]}} Check calendar for scheduled events
  • {{[[TODO]]}} Morning focus hour
@apgapg
apgapg / date_utils.dart
Last active November 10, 2021 16:03
Get correct ISO DateTime String with offset in Flutter: https://dartpad.dev/84d855e41c0134a34ff8b2cf034ad249
import 'package:intl/intl.dart';
import 'package:meta/meta.dart';
void main() {
print(DateUtils.formatISOTime(DateTime.now()));
print(DateUtils.getCurrentISOTimeString());
}
class DateUtils {
@IanColdwater
IanColdwater / twittermute.txt
Last active November 17, 2024 02:37
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@rodydavis
rodydavis / fastlane_android
Last active October 17, 2019 07:32
Fastlane Flutter Fastfile
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
default_platform(:android)
platform :android do
desc "Prepare and archive app"
lane :prepare do |options|
#bundle_install
Dir.chdir "../.." do
@rodydavis
rodydavis / fastlane_ios
Last active October 17, 2019 07:32
Flutter Fastfile for iOS
# update_fastlane(nightly: true)
default_platform(:ios)
STORE_NAME = 'ci_keychain'
before_all do
xcode_select "/Applications/Xcode.app"
if is_ci?
setup_ci(force: true)
STORE_PWD = 'FlutterRocks'
create_keychain(
@lukepighetti
lukepighetti / extents_page_view.dart
Last active January 3, 2023 13:48
Flutter PageView that loads the next/previous page off-screen
import 'package:flutter/gestures.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart' hide PageView;
/// This is copy-pasted from the Flutter framework with a support added for building
/// pages off screen using [Viewport.cacheExtents] and a [LayoutBuilder]
///
/// Based on commit 3932ffb1cd5dfa0c3891c60977ee4f9cd70ade66 on channel dev
// Having this global (mutable) page controller is a bit of a hack. We need it

How to setup a practically free CDN using Backblaze B2 and Cloudflare

⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,

@rigwild
rigwild / codeMirror_languageModuleLoader.js
Last active March 24, 2024 07:54
Asynchronously load a CodeMirror language module 🔍🤷‍♀️
/**
* CodeMirror NPM dynamic language module loader.
* To be used with WebPack.
*
* @example
* loadCodeMirrorModule(codeMirrorLanguages.JavaScript.codeMirrorMode)
*
* @author rigwild <https://github.com/rigwild>
* @see https://gist.github.com/rigwild/ce6b4c6a893c3a95f75cc0aca633f037
* @license MIT
@0xjac
0xjac / private_fork.md
Last active November 18, 2024 00:09
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@mattes
mattes / og.txt
Last active May 7, 2022 01:53
Open Graph debugger
http://ogp.me/
https://moz.com/blog/meta-data-templates-123
https://search.google.com/structured-data/testing-tool
https://developers.facebook.com/tools/debug/og/object - https://developers.facebook.com/docs/reference/opengraph
https://cards-dev.twitter.com/validator - https://dev.twitter.com/cards/types
https://developers.pinterest.com/tools/url-debugger/ - https://developers.pinterest.com/docs/rich-pins/overview/
https://developer.linkedin.com/docs/share-on-linkedin