- 日時
2021-01-29
- 作
@voluntas
- バージョン
2021.2
- url
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
// munged from https://github.com/simontime/Resead | |
namespace sead | |
{ | |
class Random | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Swagger\Annotations as SWG; | |
/** | |
* @SWG\Swagger( | |
* basePath="/v1", | |
* host="api.local", | |
* schemes={"http"}, | |
* produces={"application/json"}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport | |
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
item1 = {} | |
item2 = {} | |
item3 = {} | |
array = [item1, item2, item3] | |
array.splice array.indexOf(item2), 1 |
NewerOlder