全体として太一が感覚的に実践している事を論理的に説明しようと試みている為、
説明の粒度が適切でなかったり一貫性が無いように見える部分があるかもしれない。
普段やっているけども書ききれていない事も多分きっとある。
- コードを嗜む
- コードを学ぶ
- 武器を手に入れる
item1 = {} | |
item2 = {} | |
item3 = {} | |
array = [item1, item2, item3] | |
array.splice array.indexOf(item2), 1 |
Primary use case: workaround non-working "ip link set wlan0 netns ..." for some network drivers. | |
Secondary use case: simple demo for getting/setting the MAC address, tun/tap, raw sockets... | |
Pre-built version: http://vi-server.org/pub/tap_copy |
var fs = require('fs'); | |
var http = require('http'); | |
var util = require('util'); | |
var file = './1G.file'; | |
var stat = fs.statSync(file); | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'octet-stream/binary', | |
'Content-Length': stat.size | |
}); | |
var rStream = fs.createReadStream(file); |
#!/bin/bash | |
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport | |
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport |
<?php | |
use Swagger\Annotations as SWG; | |
/** | |
* @SWG\Swagger( | |
* basePath="/v1", | |
* host="api.local", | |
* schemes={"http"}, | |
* produces={"application/json"}, |
# Simple linux tun/tap device example tunnel over udp | |
# create tap device with ip tuntap add device0 tap | |
# set ip address on it and run tap-linux on that device and set desitation ip | |
# run same on another node, changing dst ip to first node | |
import fcntl | |
import struct | |
import os | |
import socket | |
import threading |
#! /bin/sh | |
# update glibc to 2.17 for CentOS 6 | |
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-2.17-55.el6.x86_64.rpm | |
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-common-2.17-55.el6.x86_64.rpm | |
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-devel-2.17-55.el6.x86_64.rpm | |
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-headers-2.17-55.el6.x86_64.rpm | |
sudo rpm -Uvh glibc-2.17-55.el6.x86_64.rpm \ |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
// munged from https://github.com/simontime/Resead | |
namespace sead | |
{ | |
class Random | |
{ |
2021-01-29
@voluntas
2021.2