Instantly share code, notes, and snippets.

View configuration.nix
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
View BigHashSet.cs
[DebuggerTypeProxy(typeof(HashSetDebugViewInt<>))]
[DebuggerDisplay("Count = {Count}")]
[Serializable]
public class BigHashSet<T> : IEnumerable<T>
{
private readonly BigSet<T> _set;
public BigHashSet() : this(new BigComparer<T>())
{
}
public BigHashSet(IBigEqualityComparer<T> comparer)
View sequelizeAssociations.md

Sequelize: Associations

Official Description From The Documentation

This section describes the various association types in Sequelize. When calling a method such as User.hasOne(Project), we say that the User model (the model that the function is being invoked on) is the source and the Project model (the model being passed as an argument) is the target.

Background Information From Wikipedia

Database design is the organization of data according to a database model. The designer determines what data must be stored and how the data elements interrelate. With this information, they can begin to fit the data to the database model. Database design involves classifying data and identifying interrelationships.

Overview

With PostgreSQL as our object-relational database management system (ORDBMS) and Sequelize as our library of choice to implement object-relational mapping (ORM), we will be covering the bases when it comes to the associations, or relationships, that exist among the various table

View udp2raw_kcptun_ss_for_debian9.sh
#!/bin/bash
PASSWORD=123
# 客户端配置参考(前两个可以路由运行,但是最后一个最好不要,路由性能有限,会让你觉得网络卡炸的.)
#
# udp2raw -c -r35.231.111.220:40002 -l0.0.0.0:40003 -kxxx --raw-mode faketcp -a --cipher-mode none --auth-mode simple
# kcp-client -l :9527 -r 10.0.0.1:40003 -key "xxx" -crypt none -mode fast3
# SS 客户端 => 混淆:aes-256-gcm,IP:127.0.0.1:9527,密码:刚才设置的密码.
View output_log.txt
Log uploaded on Tuesday, November 20, 2018, 7:09:02 AM
Loaded mods:
Core: (no assemblies)
HugsLib[ov:6.1.1]: 0Harmony(1.2.0.1), HugsLib(av:1.0.0.0,fv:6.1.1)
JecsTools: 0Harmony(1.0.9.1), 0JecsTools(1.0.8.0), AbilityUser(1.18.0.0), AbilityUserAI(1.18.0.0), CompActivatableEffect(1.18.0.0), CompAnimated(1.18.0.0), CompBalloon(1.18.0.0), CompDeflector(1.18.0.0), CompDelayedSpawner(1.18.0.0), CompExtraSounds(1.18.0.0), CompInstalledPart(1.18.0.0), CompLumbering(1.18.0.0), CompOverlays(1.18.0.0), CompOversizedWeapon(1.18.0.0), CompSlotLoadable(1.18.0.0), CompToggleDef(1.18.0.0), CompVehicle(1.17.0.1), PawnShields(1.0.0.0), ThinkNodes(1.0.0.0)
Humanoid Alien Races 2.0: 0Harmony(1.2.0.2), AlienRace(1.0.0.0)
Various Space Ship Chunk: 0Harmony(1.2.0.1), ShipChunkTranspiler(0.1.1.0)
Dinosauria: (no assemblies)
Furnace: (no assemblies)
Fluffy Breakdowns: 0Harmony(1.2.0.1), Fluffy_Breakdowns(av:3.0.0.0,fv:3.2.46)
View main.go
package main
import (
"encoding/csv"
"net/http"
"net/http/cookiejar"
"os"
"github.com/jlubawy/go-boilerpipe"
"github.com/jlubawy/go-cli"
View Running.txt
Compile the C++ code creating a shared library (or shared object in UNIX)
$ clang++ TestJNI.cpp -o libTestJNI.so -fPIC -shared -std=c++11 -I$HOME/opt/java/include -I$HOME/opt/java/include/linux
Run the application
$ scala -save load.scala
dir = /home/archbox/opengl/jni/libTestJNI.so
Hello world java
i = 0
View Testing equality of variances using Bartlett test.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View index.html
<div id="synth">
<svg width="100%" viewBox="0 0 270 152" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="synth-base">
<rect id="Shadow" fill-opacity="0.1" fill="#000000" x="0" y="4" width="270" height="148" rx="12"></rect>
<rect fill="#40445E" x="0" y="0" width="270" height="148" rx="12"></rect>
<path d="M0,9.99832468 C0,4.47640243 4.47593818,0 10,0 L20,0 L20,148 L10,148 C4.4771525,148 0,143.530333 0,138.001675 L0,9.99832468 Z" id="Left-Endcap" fill="#272B43"></path>
<path d="M250,0 L260,0 C265.522847,0 270,4.46966749 270,9.99832468 L270,138.001675 C270,143.523598 265.524062,148 260,148 L250,148 L250,0 Z" id="Right-Endcap" fill="#272B43"></path>
</g>
<g id="synth-keys" transform="translate(24.000000, 60.000000)">
View express_postgress_knex.md

Express & Postgres via Knex

Note: <example> is meant to denote text replaced by you (including brackets).

Setup

// global dependencies
npm install -g knex