-
This is a numbered list.
-
I'm going to include a fenced code block as part of this bullet:
Code More Code
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 <stdlib.h> | |
#include <libproc.h> | |
// Uses proc_pidinfo from libproc.h to find the parent of given pid. | |
// Call this repeatedly until ppid(pid) == pid to get ancestors. | |
int ppid(pid_t pid) { | |
struct proc_bsdinfo info; | |
proc_pidinfo(pid, PROC_PIDTBSDINFO, 0, &info, sizeof(info)); | |
return info.pbi_ppid; |
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
// This is an example of how to fetch external data in response to updated props, | |
// If you are using an async mechanism that does not support cancellation (e.g. a Promise). | |
class ExampleComponent extends React.Component { | |
_currentId = null; | |
state = { | |
externalData: null | |
}; |
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
import os | |
from dotenv import load_dotenv | |
import requests | |
from slack_sdk import WebClient | |
from slack_sdk.errors import SlackApiError | |
from datetime import date | |
from collections import defaultdict | |
import modal | |
load_dotenv() |