Skip to content

Instantly share code, notes, and snippets.

View luncliff's full-sized avatar
🥰
I love G3(Girls' Frontline)!

PARK DongHa luncliff

🥰
I love G3(Girls' Frontline)!
View GitHub Profile
@CMCDragonkai
CMCDragonkai / http_streaming.md
Last active July 29, 2025 16:31
HTTP Streaming (or Chunked vs Store & Forward)

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on

@Rod-Persky
Rod-Persky / CMakeLists.txt
Last active January 31, 2024 12:57
Example cmake for windows including auto copy dll
# _______ __ __ _______ ______ _______ _______ _______ ______ #
#| || | | || || | | _ || || || | #
#| _ || | | ||_ _|| _ || |_| ||_ _|| ___|| _ |#
#| | | || |_| | | | | | | || | | | | |___ | | | |#
#| |_| || | | | | |_| || | | | | ___|| |_| |#
#| || | | | | || _ | | | | |___ | |#
#|_______||_______| |___| |______| |__| |__| |___| |_______||______| #
# #
# Modern CMake practices and importing the QT scripts by adding it to #
# your module path makes things a lot better than it used to be #
@faithfracture
faithfracture / boost.sh
Last active September 14, 2024 14:23
Boost build script for iOS (armv7, armv7s, arm64), iOS Simulator (i386, x86_64), and OSX (i386, x86_64)
#===============================================================================
# Filename: boost.sh
# Author: Pete Goodliffe
# Copyright: (c) Copyright 2009 Pete Goodliffe
# Licence: Please feel free to use this, with attribution
# Modified version
#===============================================================================
#
# Builds a Boost framework for iOS, iOS Simulator, and OSX.
# Creates a set of universal libraries that can be used on an iOS and in the
@a-chernykh
a-chernykh / default.rb
Created March 26, 2014 17:51
Install and compile TBB for android
default[:tbb][:version] = '4.2-20140122oss'
default[:tbb][:url] = 'https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb42_20140122oss_src.tgz'
default[:tbb][:sha] = 'f1bd8d983f93a10e340ba63f3a479632ddca1562a5242814dd82a378d3233b75'
@basharam
basharam / Makefile
Last active June 21, 2024 05:16
Makefile template for Static library.
# Makefile template for Static library.
# 1. Compile every *.cpp in the folder
# 2. All obj files under obj folder
# 3. static library .a at lib folder
# 4. run 'make dirmake' before calling 'make'
CC = g++
OUT_FILE_NAME = libNAME.a
//gcc eventfd.c -o eventfd -lpthread
#include <stdio.h>
#include <unistd.h>
#include <sys/time.h>
#include <stdint.h>
#include <pthread.h>
#include <sys/eventfd.h>
#include <sys/epoll.h>
int efd = -1;
cmake_minimum_required(VERSION 2.8.10)
project(parallel_sort)
add_custom_target(parallel_sort.g++.Ofast ALL g++ -std=c++11 -Ofast -march=native -fopenmp -o parallel_sort.g++.Ofast ${PROJECT_SOURCE_DIR}/parallel_sort.cxx)
add_custom_target(parallel_sort.g++.O3 ALL g++ -std=c++11 -O3 -march=native -fopenmp -o parallel_sort.g++.O3 ${PROJECT_SOURCE_DIR}/parallel_sort.cxx)
add_custom_target(parallel_sort.g++.O2 ALL g++ -std=c++11 -O2 -march=native -fopenmp -o parallel_sort.g++.O2 ${PROJECT_SOURCE_DIR}/parallel_sort.cxx)
add_custom_target(parallel_sort.g++.O1 ALL g++ -std=c++11 -O1 -march=native -fopenmp -o parallel_sort.g++.O1 ${PROJECT_SOURCE_DIR}/parallel_sort.cxx)
add_custom_target(parallel_sort.g++.O0 ALL g++ -std=c++11 -O0 -march=native -fopenmp -o parallel_sort.g++.O0 ${PROJECT_SOURCE_DIR}/parallel_sort.cxx)
add_custom_target(parallel_sort.g++.Os ALL g++ -std=c++11 -Os -march=native -fopenmp -o parallel_sort.g++.Os ${PROJECT_SOURCE_DIR}/parallel_sort.cxx)
@mteece
mteece / EmailRepository.h
Created October 18, 2013 14:57
Objective-C blocks and Grand Central Dispatch. Using GCD and blocks effectively.
#import <Foundation/Foundation.h>
@interface EmailRepository : NSObject
+ (id)sharedEmailRepository;
- (void)getDataFromServer:(NSString *)emailAddress onComplete:(void (^)(NSString *response))completionBlock onFailure:(void (^)(NSString *response))failureBlock;
@end
@mattetti
mattetti / multipart_upload.go
Last active March 22, 2025 23:09
Example of doing a multipart upload in Go (golang)
package main
import (
"bytes"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"os"