Skip to content

Instantly share code, notes, and snippets.

View ammarfaizi2's full-sized avatar
๐Ÿ€
Baby Opossum Posse

Ammar Faizi ammarfaizi2

๐Ÿ€
Baby Opossum Posse
View GitHub Profile
#include <sys/socket.h>
#define IFACE_NAME "wl0"
int connect(int fd, const struct sockaddr *daddr, socklen_t addrlen)
{
int ret;
if (daddr->sa_family == AF_INET)
<?php
const CHAT_ID = -1001226735471; // @laravelindonesia
const BLACKLIST_WORDS = ["gan", "mastah", "mastahque", "suhu", "suhuu", "gann", "mastahh", "suhuku", "g4n", "64n", "94n", "m4st4h", "m45t4h", "agan", "juragan", "sundul", "pertamax", "gaan", "aganwati", "juraganwati", "masterque", "suhuque", "masterku", "masta", "empu", "empunya", "mastaku", "mastaque", "m4st4", "m4st4que", "m45t4", "m45t4qu3", "master2", "mastahnya", "para master", "master-master", "sungkem", "suhuuu", "muastah", "mas tah", "mas ter", "gaaan", "gaaaan", "gaaaaan", "gaann", "ggaann", "gggaaannn", "jur4g4n", "jur494n", "4g4n", "4g4nw4t1", "494n", "494nw4t1", "464n", "464nw4t1", "jur464n", "om2 master", "om master", "bertemu master", "master master", "master - master", "sama master", "pagi master", "sore master", "malam master", "malem master", "ampun master", "sungkem master", "makasih master", "thanks master", "tq master", "murid master", "izin gabung master", "ijin gabung master", "sumon master", "pencerahan master", "permisi master
.extern pthread_create
.extern pthread_join
.extern printf
.extern sleep
.section .rodata
thread_str:
.string "this is thread %d\n"
.section .text
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<div style="border: 1px solid #000; width: 300px; padding: 10px; margin: auto; margin-top: 60px;">
<table>
<tr><td>Total</td><td>:</td><td id="cpu_total"></td></tr>
<tr><td>User</td><td>:</td><td id="cpu_user"></td></tr>
#include <asm/signal.h>
static volatile int stop = 0;
static void handle_sig(int sig)
{
printf("sig = %d\n", sig);
stop = 1;
}
#include <stdio.h>
#include <fcntl.h>
#include <elf.h>
#include <string.h>
#include <errno.h>
#include <sys/auxv.h>
#include <unistd.h>
// See: https://elixir.bootlin.com/linux/v5.19-rc4/source/fs/binfmt_elf.c#L260
static inline long get_page_size(void)
{
/*
* aarch64 supports three values of page size: 4K, 16K
* and 64K which are selected at kernel compilation time.
* Therefore, we can't hard code the page size for this
* arch. Use the mmap() syscall return value to find the
* page size.
*
#include <unistd.h>
#include "base/threading/thread.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/message_loop/message_pump_type.h"
#include "net/base/request_priority.h"
#include "net/url_request/url_request_context_builder.h"
#include "net/url_request/url_request_context.h"
root@server:/tmp# ab -n 10240 -c 4096 http://127.0.0.1:8000/tmp/test
This is ApacheBench, Version 2.3 <$Revision: 1879490 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient)
Completed 1024 requests
Completed 2048 requests
Completed 3072 requests
Completed 4096 requests
#include <errno.h>
#include <string.h>
#include <sys/mman.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{