Skip to content

Instantly share code, notes, and snippets.

View Mochimazui's full-sized avatar

Mochimazui Mochimazui

  • O.O
  • Hangzhou, China
View GitHub Profile
@Mochimazui
Mochimazui / gaps-iptables.sh
Last active September 8, 2017 12:18
GAPS iptables
iptables -N GAPS
iptables -A INPUT -m state --state ESTABLISHED -j ACCEPT
iptables -A INPUT -j GAPS
#iptables -I GAPS 1 -s <source_IP> -j ACCEPT
iptables -I GAPS 1 -s 127.0.0.1 -j ACCEPT
iptables -I GAPS 1 -s 127.0.1.1 -j ACCEPT
iptables -I GAPS 1 -m iprange --src-range 10.76.5.200-10.76.5.255 -j ACCEPT
iptables -A GAPS -j DROP
@Mochimazui
Mochimazui / docker_commands.sh
Last active September 8, 2017 03:15
docker commands
# remove after exit
nvidia-docker run --rm -i -t --name lmm_docker --hostname lmm_docker nvidia/cuda /bin/bash
#
nvidia-docker run -i -t --name lmm_docker nvidia/cuda /bin/bash
nvidia-docker start -a -i lmm_docker
#include <thrust/system/cuda/vector.h>
#include <thrust/system/cuda/execution_policy.h>
#include <thrust/host_vector.h>
#include <thrust/generate.h>
#include <thrust/sort.h>
#include <thrust/scan.h>
#include <thrust/pair.h>
#include <cstdlib>
void setupGLDebug() {
glEnable(GL_DEBUG_OUTPUT);
auto cb = [](GLenum source,
GLenum type,
GLuint id,
GLenum severity,
GLsizei length,
const GLchar *msg,
const void *data) {