This file contains hidden or 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 <sys/types.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <pthread.h> | |
void* thread_function(void *arg); | |
int run_row = 1; | |
pthread_mutex_t work_mutex; |
This file contains hidden or 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
if (!isset($_SERVER['REQUEST_URI'])) | |
{ | |
// IIS Mod-Rewrite | |
if (isset($_SERVER['HTTP_X_ORIGINAL_URL'])) { | |
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL']; | |
} | |
// IIS Isapi_Rewrite | |
else if (isset($_SERVER['HTTP_X_REWRITE_URL'])) { | |
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL']; | |
} else { |
This file contains hidden or 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 <unistd.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <fcntl.h> | |
#include <signal.h> | |
#include <pthread.h> | |
#include "client_info.h" |
This file contains hidden or 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 <unistd.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <fcntl.h> | |
#include <signal.h> | |
#include "client_info.h" | |
#define FIFO_NAME "/tmp/server_fifo" |
This file contains hidden or 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
class Music(object): | |
metadata_info = ( | |
('title', 3, 33), | |
('artist', 33, 63), | |
('album', 63, 93), | |
('year', 93, 97), | |
('comment', 97, 126), | |
) |
This file contains hidden or 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
#-*- coding: utf-8 -*- | |
import sys | |
import struct | |
TABLE_START = 0x1540 | |
CHINESE_START = 0x2628 | |
TABLE_START_FLAG = '\x9D\x01\x00\x00' | |
SCEL_FLAG = '\x40\x15\x00\x00\x44\x43\x53\x01\x01\x00\x00\x00' |
This file contains hidden or 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 | |
sh_version = '1.0' | |
author="shonenada" | |
email="[email protected]" | |
pkg_version="0.1" | |
function write_setup { | |
echo "write $1" | |
echo "from setuptools import setup, find_packages" > $1 |
This file contains hidden or 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 | |
sh_version = '1.0' | |
author="shonenada" | |
email="[email protected]" | |
pkg_version="0.1" | |
function write_setup { | |
echo "write $1" | |
echo "from setuptools import setup, find_packages" > $1 |
This file contains hidden or 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 os | |
from flask import Flask | |
def create_app(import_name=None, config=None): | |
app = Flask(import_name or __name__) | |
app.config.from_object('$project_name.settings') |
This file contains hidden or 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 <dirent.h> | |
int main(int argc, char *argv[]) { | |
DIR *dp; | |
struct dirent * dirp; | |
if (argc != 2) | |
err_quit("usage: ls directory_name"); | |
if ((dp = opendir(argv[1])) == NULL) |