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 socket | |
| HOST = "127.0.0.1" | |
| PORT = 8080 | |
| RESPONSE = """HTTP/1.1 200 OK | |
| Content-Length: 3 | |
| Content-Type: text/plain | |
| lol""" |
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 <iostream> | |
| #define GLEW_STATIC | |
| #include <GL/glew.h> | |
| #include <GLFW/glfw3.h> | |
| const char *vertex_shader_source = | |
| "#version 330 core\n" | |
| "layout (location = 0) in vec3 pos;\n" |
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
| extern crate glfw; | |
| extern crate gl; | |
| use glfw::{Action, Context, Key}; | |
| use std::{os::raw::*, ffi::CString, ptr, mem}; | |
| fn main() { | |
| let vertex_shader_source = String::from(" | |
| #version 330 core |
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
| set -g @plugin 'tmux-plugins/tpm' | |
| set -g @plugin 'tmux-plugins/tmux-sensible' | |
| set -g @plugin 'dracula/tmux' | |
| # fix colors in neovim | |
| set -g default-terminal "screen-256color" | |
| set -ga terminal-overrides ",xterm-256color*:Tc" | |
| # set prefix | |
| set -g prefix C-a |
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 pygame | |
| import socket | |
| import threading | |
| ADDRESS = ('127.0.0.1', 8000) | |
| position1 = (0, 0) | |
| position2 = (0, 0) | |
| pygame.init() |
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 random | |
| def quick_sort(arr): | |
| if len(arr) <= 1: | |
| return arr | |
| pivot = arr[-1] | |
| pivot_index = len(arr) - 1 |
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
| vec4 SPHERE = vec4(0.0, 0.0, 3.0, 1.0); | |
| float FOV = 3.0; | |
| const int MAX_STEPS = 1000; | |
| float EPSILON = 0.01; | |
| float GROUND = -1.0; | |
| vec4 SPHEREC = vec4(1.0, 0.0, 0.0, 0.0); | |
| vec4 GROUNDC = vec4(0.4); | |
| vec4 SKYC = vec4(0.3, 0.4, 0.8, 1.0); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 <stdint.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <strings.h> | |
| typedef struct Pair { | |
| struct Pair *next; | |
| const char *key; | |
| void *value; |
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 <iostream> | |
| struct S { | |
| explicit S() { std::cout << "S()\n"; } // basic constructor | |
| S(const S& other) { std::cout << "S(const S&)\n"; } // copy constructor | |
| S(const S&& other) { std::cout << "S(const S&&)\n"; } // move constructor | |
| S& operator=(const S& other) { std::cout << "S& operator=(const S&)\n"; return *this; } // copy assignment operator |
OlderNewer