Skip to content

Instantly share code, notes, and snippets.

View namiwang's full-sized avatar
🎯
2024

Nami W namiwang

🎯
2024
View GitHub Profile
@threepointone
threepointone / for-snook.md
Last active August 26, 2023 15:43
For Snook

https://twitter.com/snookca/status/1073299331262889984?s=21

‪“‬In what way is JS any more maintainable than CSS? How does writing CSS in JS make it any more maintainable?”

‪Happy to chat about this. There’s an obvious disclaimer that there’s a cost to css-in-js solutions, but that cost is paid specifically for the benefits it brings; as such it’s useful for some usecases, and not meant as a replacement for all workflows. ‬

‪(These conversations always get heated on twitter, so please believe that I’m here to converse, not to convince. In return, I promise to listen to you too and change my opinions; I’ve had mad respect for you for years and would consider your feedback a gift. Also, some of the stuff I’m writing might seem obvious to you; I’m not trying to tell you if all people of some of the details, but it might be useful to someone else who bumps into this who doesn’t have context)‬

So the big deal about css-in-js (cij) is selectors.

@dominictarr
dominictarr / readme.md
Created November 26, 2018 22:39
statement on event-stream compromise

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.

@broros

otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu

@ziaulrehman40
ziaulrehman40 / CircleCI 2.0 Parallel builds SimpleCov coverage report merging locally overview.md
Last active August 30, 2020 15:10
CircleCI 2.0 Parallel builds SimpleCov coverage report merging locally

Simplecov aggregated coverage report from CircleCI 2.0 parallel builds (focused on storing locally/within CI containers as artifacts)

Problem Statement

We have Rails application which is running tests on circleCI 2.0, we have simplecov configured to track the coverage of our test suite. Now the problem is with parallelism enabled, we have partial coverage reports in all different containers according to the tests those containers ran.

We obviously want to have consolidated simplecov coverage report which actually shows us overall coverage report.

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) {
@simonw
simonw / how-to-upgrade-heroku-postgresql.md
Last active April 29, 2024 05:07
How to upgrade a Heroku PostgreSQL database to a new plan

How to upgrade a Heroku PostgreSQL database to a new plan

I started a project on a Hobby Dev plan (free, limit 10,000 rows), and then later needed to upgrade it to Hobby Basic ($9/month, limit 10,000,000 rows).

After assigning the new database, I had two databases attached to the application. They looked something like this:

  • HEROKU_POSTGRESQL_OLIVE (postgresql-dimensional-3321) Old, free-tier (Hobby Dev) database
@sauceaaron
sauceaaron / install-android-sdk-and-create-emulator.sh
Created February 8, 2018 18:17
Install Android SDK and create an Emulator
#!/bin/bash
### install Android SDK tools
echo "installing Android SDK tools"
### prepare Android SDK install location
ANDROID_HOME=Android/sdk
ANDROID_SDK_ROOT=$ANDROID_HOME/
@MadratJerry
MadratJerry / find-rls-preview.sh
Last active February 21, 2024 16:56
Find the latest rust nightly version with rls-preview
#!/bin/bash
MAC=false
date -r "$now" +%Y-%m-%d &> /dev/null
if [ "$?" -ne "0" ]; then echo "LINUX"; MAC=false; else echo 'MAC'; MAC=true; fi
now=`date +%s`
while true
do
if [ "$MAC" == "true" ]; then data=`date -r "$now" +%Y-%m-%d`; else data=`date -d @"$now" +%Y-%m-%d`; fi

Looking into the Future

futures-rs is the library which will hopefully become a shared foundation for everything async in Rust. However it's already become renowned for having a steep learning curve, even for experienced Rustaceans.

I think one of the best ways to get comfortable with using a library is to look at how it works internally: often API design can seem bizarre or impenetrable and it's only when you put yourself in the shoes of the library author that you can really understand why it was designed that way.

In this post I'll try to put down on "paper" my understanding of how futures work and I'll aim to do it in a visual way. I'm going to assume you're already somewhat familiar with Rust and why futures are a useful tool to have at one's disposal.

For most of this post I'll be talking about how things work today (as of September 2017). At the end I'll touch on what's being proposed next and also make a case for some of the changes I'd like to see.

If you're interested in learning more ab

@morewry
morewry / monorepo-tool-comparison.md
Last active May 11, 2022 08:54
Comparison of Monorepo Tools For Web Client / Front End Projects (That Probably Use HTML, CSS, and JS)

Mono Repository Tool Comparison

For Web Client / Front End Projects

(That Probably Use HTML, CSS, and JS)

I made a list of 20 things I might want out of a monorepo tool for a Design System to use as a basis for comparing some of the options including Lerna, Northbrook, and Rush.

⚠️ Northbrook's author says the project is pretty dead and now uses Lerna.

Qualifications Wanted

@clivetyphon
clivetyphon / easy-client-vpn-strongswan.md
Last active March 23, 2023 09:09
Easy client VPN for all major platforms using strongSwan IPsec

Easy client VPN for all major platforms using strongSwan IPsec

Overview

The goal here is to provide quick and easy but secure client VPN that can be configured natively without any additional software on:

  • Linux
  • iOS
  • Android
  • Windows
  • OSX