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/python | |
"""Utility functions to work with character patterns.""" | |
__lower_alpha = 'abcdefghijklmnopqrstuvwxyz' | |
__upper_alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
__numeric = '0123456789' | |
def pattern_create(length, charsets=None): | |
"""Generates a unique, nonrepeating pattern of a given length. |
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 x = 'outter'; | |
(function () { | |
var x = 'inner'; | |
alert(eval('x')); | |
})(); | |
// inner |
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
/* | |
* fork.c | |
* Experimental fork() on Windows. Requires NT 6 subsystem or | |
* newer. | |
* | |
* Copyright (c) 2012 William Pitcock <nenolod@dereferenced.org> | |
* | |
* Permission to use, copy, modify, and/or distribute this software for any | |
* purpose with or without fee is hereby granted, provided that the above | |
* copyright notice and this permission notice appear in all copies. |
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 <winsock2.h> | |
#include <iphlpapi.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#pragma comment(lib, "IPHLPAPI.lib") | |
#define MALLOC(x) HeapAlloc(GetProcessHeap(), 0, (x)) | |
#define FREE(x) HeapFree(GetProcessHeap(), 0, (x)) | |
int __cdecl main() { |
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 <windows.h> | |
#include <wininet.h> | |
#include <stdio.h> | |
#pragma comment (lib, "Wininet.lib") | |
int main(int argc, char *argv[]) { | |
HINTERNET hSession = InternetOpen( | |
L"Mozilla/5.0", // User-Agent |
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" /> | |
<title>HTML5 Camera example</title> | |
</head> | |
<body> | |
<video id="video" width="640" height="480" autoplay></video> | |
<script type="text/javascript"> | |
var video = document.getElementById('video'); |
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 <stdio.h> | |
#include <winsock2.h> | |
#include <ws2tcpip.h> | |
#include <openssl/ssl.h> | |
#include <openssl/err.h> | |
// include order is important. | |
using namespace std; | |
#pragma comment (lib, "Ws2_32.lib") |
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
from Crypto.Cipher import Blowfish | |
from struct import unpack | |
def once(d): | |
iv = '\x01\x02\x03\x04\x05\x06\x07\x08' | |
key, d = d[:2], d[2:] | |
name, d = d[:8], d[8:] | |
iv, name = name, Blowfish.new(key, Blowfish.MODE_CBC, iv).decrypt(name) |
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
// SingleTone 1 | |
// singleton on bss | |
#include <iostream> | |
using namespace std; | |
class Cursor { | |
private: | |
// 규칙 1. private constructor | |
Cursor() { } |
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 urllib2 | |
import urllib | |
import itertools | |
import mimetools | |
import mimetypes | |
from cStringIO import StringIO | |
class MultiPartForm(object): | |
"""Accumulate the data to be used when posting a form.""" |