Skip to content

Instantly share code, notes, and snippets.

@adammyhre
adammyhre / Preconditions.cs
Last active May 21, 2024 05:28
Unity Preconditions Class
using System;
public class Preconditions {
Preconditions() { }
public static T CheckNotNull<T>(T reference) {
return CheckNotNull(reference, null);
}
public static T CheckNotNull<T>(T reference, string message) {
@baymaxium
baymaxium / content.md
Created October 18, 2017 08:01
区块链,将如何重新定义世界?

原文:硅谷密探

硅谷Live / 实地探访 / 热点探秘 / 深度探讨

( Image : Killzone: Shadow Fall Review by Zac Davis )

@belaw
belaw / fork.reg
Last active May 21, 2024 05:21
Fork Git Client Windows Explorer Integration
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\directory\background\shell\git_fork]
@="Open in &Fork"
"Icon"=hex(2):25,00,4c,00,4f,00,43,00,41,00,4c,00,41,00,50,00,50,00,44,00,41,\
00,54,00,41,00,25,00,5c,00,46,00,6f,00,72,00,6b,00,5c,00,46,00,6f,00,72,00,\
6b,00,2e,00,65,00,78,00,65,00,2c,00,30,00,00,00
[HKEY_CLASSES_ROOT\directory\background\shell\git_fork\command]
@=hex(2):22,00,25,00,4c,00,4f,00,43,00,41,00,4c,00,41,00,50,00,50,00,44,00,41,\
@agoose77
agoose77 / flake.nix
Last active May 21, 2024 05:18
Python virtualenvironment flake
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = inputs @ {
self,
nixpkgs,
flake-utils,
...
@imba-tjd
imba-tjd / .Cloud.md
Last active May 21, 2024 05:18
☁️ 一些免费的云资源

IaaS指提供系统(可以自己选)或者储存空间之类的硬件,软件要自己手动装;PaaS提供语言环境和框架(可以自己选);SaaS只能使用开发好的软件(卖软件本身);BaaS一般类似于非关系数据库,但各家不通用,有时还有一些其它东西。

其他人的集合

@brianclements
brianclements / Commit Formatting.md
Last active May 21, 2024 05:17
Angular Commit Format Reference Sheet

Commit Message Format

This specification is inspired by and supersedes the [AngularJS commit message format][commit-message-format].

We have very precise rules over how our Git commit messages must be formatted. This format leads to easier to read commit history.

Each commit message consists of a header, a body, and a footer.

@jeffochoa
jeffochoa / Response.php
Last active May 21, 2024 05:09
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
@lcrilly
lcrilly / README.md
Last active May 21, 2024 05:08
Prometheus exporter for NGINX Unit metrics

Prometheus exporter for NGINX Unit metrics

The NGINX Unit control API includes a /status endpoint for usage statistics. This is a solution for exposing these metrics in Prometheus format.

The application (run by Unit) queries the /status URI on the control socket and converts the JSON response into Prometheus text format. PHP and Python implementations are available.

These instructions assume an existing Unit installation with a working configuration. We will add a new listener on the default prometheus port (9090) and route it directly to the Prometheus app.

Step 0. Install the preferred Unit language module (unit-php or unit-python)

1. Photoscissors 6.1 : UAAA-UAYO-AKBA-LAAA-WULP-MAKA-IFHA-CLAF
2. Batch Inpaint 2.2: ZUKA-BACE-GTRD-UCNR-LYDK-TVZG-ORNZ-HUTY
3. DupHunter 2.0: QRRD-ODNY-DJEI-CABC-AIVN-EPTP-DGAT-JSWB
4. FolderIco 6.2.x: FKAA-HAWO-MBRY-FHEV-UKAJ-DYHV-XWWA-PAFP
5. Inpaint 8.0: HWTU-QACW-ELMN-SVGP-AAAI-ITGP-EYPH-CFAP
6. Intelligent Resizer 3.0: EHSP-XUTD-UANB-XBBX-FUAQ-IPAP-UBNK-FFZR
7. NetLimiter 3
Registration name: Peter Raheli
Registration code: C99A2-QSSUD-2CSBG-TSRPN-A2BEB
@krisbolton
krisbolton / fix-USB-showing-up-as-two-partitions.md
Last active May 21, 2024 05:04
How to fix a USB drive showing up as two drives (fragmented into multiple partitions) on Windows

How to fix a USB drive showing up as two drives (fragmented into multiple partitions) on Windows:

  1. Hold the Windows key and press X, select PowerShell (Admin), select Yes to the pop-up. You can also use Command Prompt.
  2. In the Powershell interface type diskpart to enter the disk partition tool.
  3. Type list disk to see all disks listed.
  4. Select the USB drive by typing select disk [NUMBER]. Be careful to select the correct drive.
  5. Type clean. An error will occur if you have the drive folder open, close the window and repeat the command if this happens.
  6. Type create partition primary.
  7. Type format fs=ntfs quick to format the drive (you can also choose to set fs=fat32).
  8. Type active.