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
<?php
/*
* Link: https://fb.com/10159955933216101
*/
$arr1 = array(
array(
'id'=> 1,
'nama' => 'anto',
'alamat' => 'jln 101'
@ammarfaizi2
ammarfaizi2 / slc.cpp
Created May 28, 2022 22:32
Socket Lost Control (v5 revision)
// SPDX-License-Identifier: GPL-2.0-only
/*
* Socket Lost Control.
*
* Copyright (C) 2022 Ammar Faizi <[email protected]>
*/
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
@ammarfaizi2
ammarfaizi2 / slc.cpp
Created May 28, 2022 00:15
Socket Lost Control v4
// SPDX-License-Identifier: GPL-2.0-only
/*
* Socket Lost Control.
*
* Copyright (C) 2022 Ammar Faizi <[email protected]>
*/
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
@ammarfaizi2
ammarfaizi2 / slc.cpp
Created May 27, 2022 23:41
Socket Lost Control v3
// SPDX-License-Identifier: GPL-2.0-only
/*
* Socket Lost Control.
*
* Copyright (C) 2022 Ammar Faizi <[email protected]>
*/
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
@ammarfaizi2
ammarfaizi2 / slc.cpp
Created May 27, 2022 16:16
Socket Lost Control v2
// SPDX-License-Identifier: GPL-2.0-only
/*
* Socket Lost Control.
*
* Copyright (C) 2022 Ammar Faizi <[email protected]>
*/
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
@ammarfaizi2
ammarfaizi2 / slc.cpp
Last active May 27, 2022 14:00
Socket Lost Control
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#ifndef likely
#define likely(EXPR) __builtin_expect(!!(EXPR), 1)
#endif
#ifndef unlikely
# Link: https://fb.com/1159106481594512
def combinations(a, n):
if n == 1:
for x in a:
yield [x]
else:
for i in range(len(a)):
for x in combinations(a[:i] + a[i+1:], n-1):
yield [a[i]] + x
Link: https://fb.com/1159106481594512
Beluga
Beluag
Belgua
Belgau
Belaug
Belagu
Beulga
Beulag
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2022 Ammar Faizi <[email protected]>
*
* A Simple multi-threaded coroutine written in C.
* Running on Linux x86-64.
*/
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
; This is a program to reverse string.
; Link System V ABI x86-64: https://gitlab.com/x86-psABIs/x86-64-ABI/-/wikis/home
; Link discussion: https://t.me/GNUWeeb/583153
section .data
INPUT db "QWERTYUIOPASDFGHJKL", 0
section .text
global _start