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 <errno.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdio.h> | |
#include <sys/socket.h> | |
#include <sys/stat.h> | |
#include <netinet/in.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
<?php | |
const APP_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; | |
$db_file = __DIR__."/db.json"; | |
/** | |
* @param int $val | |
* @return array | |
*/ | |
function hextorgb(int $val): array |
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
<?php | |
$x = '{ | |
"87ea1da1f230b2bbdf6c1d55aebca015": { | |
"link_fb": "https://www.facebook.com/profile.php?id=100079382088696", | |
"created_at": "2022-06-08 03:51:09" | |
}, | |
"25b77e954948eb7af45ea6be6e501ce4": { | |
"link_fb": "https://www.facebook.com/profile.php?id=100055461167518", | |
"created_at": "2022-06-08 03:51:17" |
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
// SPDX-License-Identifier: Public domain | |
/* | |
* @author Alviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org> | |
* | |
* Link: https://t.me/CCpp_Indonesia/62635 | |
* | |
* v2: | |
* - Fix a small bug when the last char group is a word. | |
* Link: https://t.me/CCpp_Indonesia/62700 |
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
/* | |
* excercise simple arithmetic with intel AVX-512 | |
*/ | |
.section .data | |
arr1: | |
.quad 0x1, 0x2, 0x3, 0x4 | |
arr2: | |
.quad 0x1, 0x2, 0x3, 0x4 | |
arr3: | |
.quad 0x0, 0x0, 0x0, 0x0 |
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 <inttypes.h> | |
#include <stdint.h> | |
#include <pthread.h> | |
#include <stdio.h> | |
#include <stdatomic.h> | |
typedef int spinlock_t; | |
void __spin_lock(spinlock_t *lock); |
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 <stdio.h> | |
#include <string.h> | |
#define BUF_SIZE 4096 | |
int main(int argc, const char *argv[]) | |
{ | |
char buf[BUF_SIZE]; | |
unsigned line; | |
FILE *f; |
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
// SPDX-License-Identifier: What-the-fuck-public-domain | |
/* | |
* No Copyright. | |
* | |
* Author: Alviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org> | |
* | |
* Fuck Golang: A proof that Golang changes its %rsp to a newly | |
* mapped VM area. | |
* | |
* How to run this: |
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 <liburing.h> | |
#include <stdio.h> | |
#define NR_ENTRIES 32 | |
int main(void) | |
{ | |
struct io_uring ring; | |
struct io_uring_sqe *sqe; | |
struct io_uring_cqe *cqe; | |
unsigned i, j, head; |
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 <stdlib.h> | |
#include <sys/wait.h> | |
#include <string.h> | |
#include <stdio.h> | |
static int system_fd(const char *cmd) | |
{ | |
int pipe_fd[2]; | |
pid_t child; |
OlderNewer