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 main | |
import ( | |
"fmt" | |
"net" | |
"time" | |
) | |
func main() { | |
dialer := &net.Dialer{ |
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 main | |
import ( | |
"bufio" | |
"fmt" | |
"net" | |
"sync" | |
) | |
func 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 <iostream> | |
#include <functional> | |
#include <chrono> | |
#include <vector> | |
#include <thread> | |
// unix header | |
#include <sys/types.h> | |
#include <sys/mman.h> | |
#include <sys/wait.h> |
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
class measure | |
{ | |
using time_point = std::chrono::high_resolution_clock::time_point; | |
static inline time_point now() { return std::chrono::high_resolution_clock::now(); } | |
time_point start_ = now(); | |
public: | |
~measure() { std::cout << std::chrono::duration_cast<std::chrono::nanoseconds>(now() - start_).count() | |
<< " nanoseconds\n"; } | |
}; |
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
#ifndef NET_UTIL_HPP_ | |
#define NET_UTIL_HPP_ | |
#include <functional> | |
#include <memory> | |
#include <iterator> | |
#include <algorithm> | |
#include <chrono> | |
#include <string> | |
#include <cstring> |
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
# Created by hare1039 | |
$ErrorActionPreference = "Inquire" | |
$key = Read-Host -Prompt 'Enter Cookie Key' | |
$value = Read-Host -Prompt 'Enter Cookie Value' | |
Write-Host '[1] Accept all friend requests' | |
Write-Host '[2] Delete all friend requests' | |
$mode = Read-Host -Prompt 'Please enter 1 or 2' | |
if ($mode -eq "1") { |
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 <iostream> | |
#include <chrono> | |
#include <type_traits> | |
#include <variant> | |
// concept: Animations = time duration + Callable | |
template<typename ... Animations> | |
class compose | |
{ | |
static inline auto now() { return std::chrono::high_resolution_clock::now(); } |
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 <iostream> | |
#include <random> | |
#include <sstream> | |
#include <set> | |
bool is_all_different(int i) | |
{ | |
std::stringstream ss; | |
ss << i; | |
std::string s = ss.str(); |
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 <iostream> | |
#include <vector> | |
class ooxx | |
{ | |
/* ------------- | |
| 1 | 2 | 3 | | |
------------- | |
| 4 | 5 | 6 | | |
------------- |
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 <iostream> | |
#include <iterator> | |
#include <vector> | |
#include <array> | |
template<typename T, typename _ = void> | |
struct is_container : std::false_type {}; | |
template<typename... Ts> | |
struct is_container_helper {}; |