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
import socket | |
import datetime | |
""" | |
Instead of header+stuff | |
just make a function that adds that | |
""" | |
def list_to_html(l): | |
html = "" |
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 <stdio.h> | |
#include <cstdint> | |
#include <Windows.h> | |
struct Beep | |
{ | |
uint32_t freq; | |
uint32_t duration; | |
}; |
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 <sys/socket.h> | |
#include <string.h> | |
#include <fcntl.h> | |
#include <sys/sendfile.h> | |
#include <unistd.h> | |
#include <netinet/in.h> | |
void main() { | |
int s = socket(AF_INET, SOCK_STREAM, 0); | |
struct sockaddr_in addr = { |
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 <stdio.h> | |
#include <string.h> | |
void edit_line(char* buffer, int current_line) { | |
for (int i = 0; i < current_line; i++) { | |
buffer = strchr(buffer, '\n') + 1; | |
} | |
char* line_end = strchr(buffer, '\n'); | |
char saved[1024] = { 0 }; |
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 <sys/socket.h> | |
#include <netinet/in.h> | |
#include <openssl/ssl.h> | |
#include <string.h> | |
#include <stdio.h> | |
void main() { | |
int sockfd = socket(AF_INET, SOCK_STREAM, 0); | |
struct sockaddr_in addr = { |
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 <curses.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
void main() { | |
WINDOW* win = initscr(); | |
keypad(win, true); | |
nodelay(win, true); | |
int posX = 0; | |
int posY = 0; |
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 <stdio.h> | |
#include <stdbool.h> | |
void print_hex(unsigned char* buffer, int num) { | |
for (int i = 0; i < num; i++) { | |
if (i % 10 == 0) { | |
printf("\n"); | |
} | |
printf("%.2X ", buffer[i]); |
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 <sys/types.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
#include <openssl/ssl.h> | |
#include <stdio.h> | |
#include <string.h> | |
void main() { | |
int sockfd = socket(AF_INET, SOCK_STREAM, 0); |
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 <X11/Xlib.h> | |
int main() { | |
XEvent event; | |
Display* display = XOpenDisplay(NULL); | |
Window w = XCreateSimpleWindow(display, DefaultRootWindow(display), 50, 50, 250, 250, 1, BlackPixel(display, 0), WhitePixel(display, 0)); | |
XMapWindow(display, w); | |
XSelectInput(display, w, ExposureMask); | |
for (;;) { |
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 <Windows.h> | |
LRESULT WinProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { | |
switch (uMsg) { | |
case WM_PAINT: | |
HDC hDc = GetDC(hWnd); | |
RECT rect = { | |
75, | |
75, | |
250, |
OlderNewer