Skip to content

Instantly share code, notes, and snippets.

ntzyz@ntzyz-7060 ~ % df -h | grep nvme
/dev/nvme0n1p3 155G 108G 39G 74% /
/dev/nvme0n1p1 300M 76M 225M 26% /boot
ntzyz@ntzyz-7060 ~ % sudo smartctl -x /dev/nvme0
smartctl 7.0 2018-12-30 r4883 [x86_64-linux-5.0.9-arch1-1-ARCH] (local build)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Number: CA3-8D256-Q11 NVMe LITEON 256GB
Serial Number: TW0546VPLOH0081R00HJ
*** Segmentation fault
Register dump:
RAX: 00007f9d18001840 RBX: 00007f9d18000080 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007fff73dead80 R8 : 0000000000000000 R9 : 00007f9d5ccdafe0
R10: 0000000000000010 R11: 0000000000000060 R12: 00007f9d5cce0390
R13: 00007f9d5cce03a0 R14: 00007f9d5cce0380 R15: 000056359f5f9ed0
RSP: 00007fff73dead58
@ntzyz
ntzyz / flac_decode.c
Last active September 30, 2018 02:42
decode and playback flac file with FLAC + SDL
#include <SDL.h>
#include <math.h>
#include <FLAC/stream_decoder.h>
#include <pthread.h>
void feed_audio_stream(void *userdata, uint8_t *stream, int length);
void cleanup_event_queue() {
static SDL_Event e;
while (SDL_PollEvent(&e)) {
diff --git a/js/app.js b/js/app.js
index cb7221c..72ec32f 100644
--- a/js/app.js
+++ b/js/app.js
@@ -74,6 +74,11 @@ var graph = new vis.Network(container, {nodes, edges}, {
shapeProperties: {
useBorderWithImage: true
}
+ },
+ edges: {
const net = require('net');
const TYPE = {
IPV4: 0x01,
DOMAIN: 0x03,
IPV6: 0x04,
};
const server = net.createServer(socket => {
// 准备接受客户端的握手
ntzyz@ntzyz-celeron ~/new-blog (git)-[test] % npm run test
> @ test /home/ntzyz/new-blog
> cross-env NODE_ENV=test nyc mocha ./test -R nyan --require babel-register --require babel-polyfill --recursive -u tdd --timeout 1000 --colors --exit
Your access token is BEYjxWJIKT7L5yH
Database connected.
Server started on port 1234
18 -_-_-_-_-_-_-_-_-_-_,------,
0 -_-_-_-_-_-_-_-_-_-_| /\_/\
function loadSkin(domImg, domCanvas) {
var renderer;
this.renderer = renderer = new THREE.WebGLRenderer({
canvas: domCanvas,
// antialias: true
});
renderer.setClearColor(0xffffff);
var scene = this.scene = new THREE.Scene();
var camera = this.camera = new THREE.PerspectiveCamera(45, 1, 1, 80);
<!doctype html>
<html>
<head>
<title></title>
<meta charset="UTF-8" />
</head>
<body>
<table>
<tr>
<td>sigma</td>
#!/bin/bash
iptables \
-I FORWARD \
-m string \
--algo bm \
--string "http://welcome.jsinfo.net/cas/view/c"\
-j DROP
iptables \
<!DOCTYPE html>
<html>
<head>
<title>Index</title>
<meta charset="UTF-8" />
<style>
.button {
padding-left: 0.5em;
padding-right: 0.5em;
padding-top: 0.2em;