Skip to content

Instantly share code, notes, and snippets.

View shonenada's full-sized avatar
🤷‍♂️
Focusing

Yaoda Liu shonenada

🤷‍♂️
Focusing
View GitHub Profile
#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;
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 {
#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"
#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"
class Music(object):
metadata_info = (
('title', 3, 33),
('artist', 33, 63),
('album', 63, 93),
('year', 93, 97),
('comment', 97, 126),
)
#-*- 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'
#!/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
#!/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
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')
#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)