Skip to content

Instantly share code, notes, and snippets.

View injust90's full-sized avatar
🎯
Focusing

Justin Chou injust90

🎯
Focusing
View GitHub Profile
@injust90
injust90 / looper.verse
Created April 17, 2024 04:29
Loop through players
CheckForFlag()<suspends>:void=
loop:
Sleep(1.0)
AllPlayers:=GetPlayspace().GetPlayers()
for(Player:AllPlayers):
# this casts to the player object to get an agent
if(IsAgent:agent = agent[Player]):
if(ConditionalButton.IsHoldingItem[IsAgent]):
class_granter.ChangeClass(IsAgent)
else:
#include <stdio.h>
#define MAXLINE 1000
/* copy input to output; 2nd */
main ()
{
int len;
int max;
char line [MAXLINE];
char longest [MAXLINE];
#OBJS specifies which files to compile as part of the project
OBJS = main.cpp
#CC Specifies which compiler we're using
CC = g++
#COMPILER_FLAGS specifies the additional compilation options we're using
# -w suppressess all warnings
COMPILER_FLAGS = -w
syntax enable
" https://github.com/sainnhe/everforest
colorscheme everforest
set background=dark
set guifont=Source_Code_Pro_SemiBold:h12
set guicursor+=a:blinkon0
set guioptions-=m
set guioptions-=T
set guioptions -=r
@injust90
injust90 / diagonal_algorithm.cpp
Last active December 26, 2022 21:42
Cross counting X pattern in a vector
#include <iostream>
#include <vector>
using namespace std;
// Defining rows and columns of
// vector of vectors
int main()
{
int diagonalRight = 0;
@injust90
injust90 / smoke.cfg
Created December 22, 2022 22:18
smoke practice for cs:go
sv_cheats 1;
bot_kick;
mp_warmup_end;
mp_freezetime 0;
mp_roundtime_defuse 60;
sv_grenade_trajectory 1;
sv_grenade_trajectory_time 10;
sv_showimpacts 1;
ammo_grenade_limit_total 5;
sv_infinite_ammo 1;
@injust90
injust90 / Game.h
Last active December 1, 2022 05:11
#include <SDL2/SDL.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include <SDL2/SDL_ttf.h>
#include <SDL2/SDL_mixer.h>
@injust90
injust90 / Makefile
Created November 28, 2022 22:10
Makefile template
# OBJS declares the files to be compiled
OBJS = Main.cpp Game.cpp
# CC declares the compiler (GCC)
CC = g++
# COMPILER_FLAGS declares the additional compilation options
# -w suppresses warnings
COMPILER_FLAGS = -w
#include <stdio.h>
#include <string>
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include <SDL2/SDL_ttf.h>
#include <SDL2/SDL_mixer.h>
const int SCREEN_WIDTH = 1280;
const int SCREEN_HEIGHT = 960;
#include "CircleComponent.h"
#include "Actor.h"
CircleComponent::CircleComponent(class Actor* owner)
:Component(owner)
, mRadius(0.0f)
{
}