Skip to content

Instantly share code, notes, and snippets.

Angular Team - Code Style Guidance

  • Adhere to English rules (grammar, spelling,...)
  • Variable name must be self-explanatory and describe the stored value.
  • Variable name must be nouns.
  • Function name must be verbs.
  • Using camelCase for identifier names (for both variable and function)
  • Private variables must have # prefix from the ES2022. However, while ES2021 or less, TS will use WeakMap in place of # so using TS private and _ prefix combination instead.
@bluewalk
bluewalk / GetNordVPNWireGuardDetails.md
Last active January 15, 2025 07:49
Getting NordVPN WireGuard details

About

Instructions to obtain WireGuard details of your NordVPN account. These can be used to setup a WireGuard tunnel on your router to NordVPN.

Source: https://forum.gl-inet.com/t/configure-wireguard-client-to-connect-to-nordvpn-servers/10422/27

Prerequisites

If you have any linux machine, use that or install a vm if you don't have one.

Get their official linux app installed. Make sure you have wireguard installed too. And set the used technology to Nordlynx by running nordvpn set technology nordlynx

— Да?
— Алё!
— Да да?
— Ну как там с деньгами?
— А?
— Как с деньгами-то там?
— Чё с деньгами?
— Чё?
— Куда ты звонишь?
@Swader
Swader / build.dart
Created March 14, 2013 18:25
Recursive folder copy in Dart: An updated Dart web_ui build script which recursively copies a folder and its contents to another location. Useful when building for a defined vhost (e.g. Apache with PHP back end for your Dart app) and don't want the build script to relativize your paths to go "one folder up" back from /out into /web to get CSS an…
import 'dart:io';
import 'package:web_ui/component_build.dart';
// Ref: http://www.dartlang.org/articles/dart-web-components/tools.html
main() {
build(new Options().arguments, ['web/index.html']);
//recursiveFolderCopySync('web/assets', 'web/out/assets');
}
bool isSymlink(String pathString) {
@JunichiIto
JunichiIto / alias_matchers.md
Last active January 15, 2025 07:43
List of alias matchers in RSpec 3

This list is based on aliases_spec.rb.

You can see also Module: RSpec::Matchers API.

matcher aliased to description
a_truthy_value be_truthy a truthy value
a_falsey_value be_falsey a falsey value
be_falsy be_falsey be falsy
a_falsy_value be_falsey a falsy value
@wojteklu
wojteklu / clean_code.md
Last active January 15, 2025 07:41
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@xiaohk
xiaohk / acm-cc.md
Last active January 15, 2025 07:39
How to generate CC copyblock for ACM paper

Create a CC Block for ACM Preprints

Here are two methods to create a nice CC copyright block for your ACM preprint.

First, you need to check your acmart.cls version (you can find it from the first 50 lines of this file).

version >= v1.87

@VirusRushTheater
VirusRushTheater / login_popup_remover.js
Last active January 15, 2025 07:39
Tampermonkey script to remove Twitter login popups
// ==UserScript==
// @name Twitter login popup remover
// @namespace http://github.com/VirusRushTheater
// @version 0.1
// @description No, I don't wanna register on Twitter
// @author VirusRushTheater
// @match https://twitter.com/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==

Setup AWS CDK update history database

This script can setup duckdb database for to analyze AWS CDK updates from GitHub releases.

Require

  • DuckDB
  • GitHub CLI

Install

@gk525152097
gk525152097 / index.html
Created November 8, 2021 05:26
Mapbox THREE.js raycaster test
<div id="map"></div>