Skip to content

Instantly share code, notes, and snippets.

View araml's full-sized avatar
🦊
As cold as any stone

L araml

🦊
As cold as any stone
View GitHub Profile
@araml
araml / Makefile
Last active September 21, 2016 17:25
# Compiler
CC = g++
# Compiler flags -Weffc++
CFLAGS = -Wpedantic -Wall -Wextra -c -g -std=c++11 -ggdb -O0
# Linker flags
LDFLAGS =
# for glw3 LDLFLAGS = -lGLEW -lglfw3 -lGL -lX11 -lXi -lXrandr -lXxf86vm -lXinerama -lXcursor -lrt -lm -pthread -ldl
HEADERS =
@araml
araml / init.vim
Last active November 14, 2024 23:37
My vimrc for neovim
if $SHELL =~ 'bin/fish'
set shell=/bin/sh
endif
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
call plug#begin('~/.local/share/nvim/plugged')
" " alternatively, pass a path where Vundle should install plugins
@araml
araml / .clang-format
Last active October 2, 2018 16:59
My clang format
AlignTrailingComments: true
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ColumnLimit: 80
IndentWidth: 4
Language: Cpp
@araml
araml / Max.cu
Last active March 1, 2021 11:45
Max reduce in cuda
#include <vector>
#include <cuda.h>
#include <cuda_runtime.h>
#include <device_functions.h>
#include <cuda_runtime_api.h>
using namespace std;
//1
@araml
araml / auto_list.h
Last active October 24, 2017 12:13
auto_list
#pragma once
#include <vector>
template <typename T>
class auto_list {
protected:
auto_list() {
v.emplace_back(static_cast<T*>(this));
}
@araml
araml / sdl_mixer_test.cpp
Last active April 15, 2018 23:44
SDL Mixer Test
// g++ sdl_mixer_test.cpp -o sdl_mixer -lSDL2 -lSDL2_mixer -std=c++11
#include <SDL2/SDL.h>
#include <chrono>
#include <SDL2/SDL_mixer.h>
using namespace std::chrono;
SDL_Window *window = NULL;
int main(int argc, char **argv) {
@araml
araml / flibitPackaging.md
Created January 25, 2019 19:47 — forked from flibitijibibo/flibitPackaging.md
Hope you like reading ldd output!

A week ago I was CC'd in on a thread about Linux packaging, and how to avoid doing it the wrong way (i.e. RPM, Deb, etc.). I've always used MojoSetup and I've never forced distributions to do any additional work, but this is still a new concept to a lot of people. Additionally, Amos suggested that I expand on Itch's FNA appendix, so here's a guide on how I package my games.

This is a bit of an expansion on my MAGFest 2016 presentation, which you can find here:

http://www.flibitijibibo.com/magfest2016/

https://www.youtube.com/watch?v=B83CWUh0Log

I would recommend looking at that first! After that, read on...

@araml
araml / identify_hashes.sh
Created June 10, 2020 15:48
Identify hash types with john the ripper (usage identify_hashes.sh file_with_hashes.txt)
#!/bin/bash
cat $1 | while read line
do
echo $line > hash_test.txt
timeout 4s sh -c "john hash_test.txt 2>&1 | grep 'Loaded\|hash type'"
done
rm "hash_test.txt"
@araml
araml / fish functions
Last active March 3, 2021 18:05
fish functions
# 0x0.st
function 0x0
curl -F"file=@$argv" http://0x0.st
end
function nvidia
nvidia-settings -a "DigitalVibrance=1023" >/dev/null
end
function sgrep --description 'Grep inside all files in this directory'
@araml
araml / .clang-tidy
Created May 21, 2021 14:46
clang-tidy
Checks:
'clang-analyzer-*,
clang-diagnostic-*,
clang-analyzer-*,
performance-*,
portability-*,
performance-*,
android*,
readability-identifier-naming-*,
bugprone-parent-virtual-call,