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
import ctypes | |
from ctypes import CDLL, CFUNCTYPE, c_int, c_void_p, c_char_p | |
libc = CDLL('libc.so.6') | |
CSIGNAL = 0x000000ff | |
CLONE_VM = 0x00000100 | |
CLONE_FS = 0x00000200 | |
CLONE_FILES = 0x00000400 | |
CLONE_SIGHAND = 0x00000800 |
We can't make this file beautiful and searchable because it's too large.
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
"1.0.0.0","1.0.0.255","16777216","16777471","AU","Australia" | |
"1.0.1.0","1.0.3.255","16777472","16778239","CN","China" | |
"1.0.4.0","1.0.7.255","16778240","16779263","AU","Australia" | |
"1.0.8.0","1.0.15.255","16779264","16781311","CN","China" | |
"1.0.16.0","1.0.31.255","16781312","16785407","JP","Japan" | |
"1.0.32.0","1.0.63.255","16785408","16793599","CN","China" | |
"1.0.64.0","1.0.127.255","16793600","16809983","JP","Japan" | |
"1.0.128.0","1.0.255.255","16809984","16842751","TH","Thailand" | |
"1.1.0.0","1.1.0.255","16842752","16843007","CN","China" | |
"1.1.1.0","1.1.1.255","16843008","16843263","AU","Australia" |
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 | |
DATA=./GeoIPCountryWhois.csv | |
IPT=/sbin/iptables | |
for IPRANGE in `egrep "China" $DATA | cut -d, -f1,2 | sed -e 's/"//g' | sed -e 's/,/-/g'` | |
do | |
$IPT -A INPUT -p all -m iprange --src-range $IPRANGE -j DROP | |
done |
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
/*! | |
* IE10 viewport hack for Surface/desktop Windows 8 bug | |
* Copyright 2014 Twitter, Inc. | |
* Licensed under the Creative Commons Attribution 3.0 Unported License. For | |
* details, see http://creativecommons.org/licenses/by/3.0/. | |
*/ | |
// See the Getting Started docs for more information: | |
// http://getbootstrap.com/getting-started/#support-ie10-width |
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
#!/usr/bin/env python | |
import struct | |
import re | |
from io import BytesIO | |
import sys | |
from code_attribute import read_code_attribute | |
uint8 = lambda x: struct.unpack('>B', x)[0] | |
uint16 = lambda x: struct.unpack('>H', x)[0] | |
int32 = lambda x: struct.unpack('>l', x)[0] |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<style> | |
.table-wrap { | |
/* width: 300px; */ | |
height: 300px; |
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
package benchmark; | |
public class GCBenchmark { | |
private static class MemoryAllocator { | |
private int[] buffer; | |
private MemoryAllocator(int size) { | |
this.buffer = new int[size]; | |
} |
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 | |
# | |
# Usage | |
# install-arch.sh ./archlinux-2018.11.01-x86_64.iso | |
# first you neeed to patch xhyve with this | |
# index 61aeebb..39a9c4b 100644 | |
# --- a/src/firmware/kexec.c | |
# +++ b/src/firmware/kexec.c | |
# @@ -185,6 +185,7 @@ kexec_load_ramdisk(char *path) { |
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
#!/usr/bin/env python | |
import os | |
import argparse | |
from multiprocessing import Queue, Process | |
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
def worker(q): | |
options = Options() |
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
"use strict"; | |
var input = '13자리의 주민번호 - 없이'; | |
var mul = [2,3,4,5,6,7,8,9,2,3,4,5]; | |
var sum = 0; | |
for(var i =0; i < mul.length; i++) { | |
var digit = parseInt(input[i]); | |
sum += digit * mul[i]; | |
} |
NewerOlder