Skip to content

Instantly share code, notes, and snippets.

View arghav's full-sized avatar

arghav arghav

View GitHub Profile
@raysan5
raysan5 / raylib_vs_sdl.md
Last active August 7, 2025 23:55
raylib vs SDL - A libraries comparison

raylib_vs_sdl

In the last years I've been asked multiple times about the comparison between raylib and SDL libraries. Unfortunately, my experience with SDL was quite limited so I couldn't provide a good comparison. In the last two years I've learned about SDL and used it to teach at University so I feel that now I can provide a good comparison between both.

Hope it helps future users to better understand this two libraries internals and functionality.

Table of Content

# Luke's config for the Zoomer Shell
# Enable colors and change prompt:
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
# History in cache directory:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zsh/history
@ctaylo21
ctaylo21 / init.vim
Created July 1, 2018 15:45
Example of dimming inactive windows in Neovim
" Background colors for active vs inactive windows
hi ActiveWindow guibg=#17252c
hi InactiveWindow guibg=#0D1B22
hi ActiveTerminal guibg=#333333
" Call method on window enter
augroup WindowManagement
autocmd!
autocmd WinEnter * call Handle_Win_Enter()
augroup END
@renatorib
renatorib / operator_with_ligatures.md
Last active January 11, 2024 06:45
Using Operator Mono with Fira Code ligatures in Atom.

Using Operator Mono with Fira Code ligatures in Atom.

  1. Open your Atom's Stylesheet
    image

  2. Put this css

atom-text-editor {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
if [ "$1" == "--rollback" ]
then
echo "> Rolling back to the previous version"
ssh -p $port $target "
DIRS=(\`ls $parentDir | grep $childDir-[0-9] | sort -r\`);
if [ \"\${DIRS[0]}\" = \"\" ]; then echo \"! No rollback dir available\"; exit; fi
mv $targetDir $targetDir-tmp
mv $parentDir/\${DIRS[0]} $targetDir
chmod -R +w $targetDir-tmp 2>/dev/null;
@schmittjoh
schmittjoh / AjaxFailureHandler.php
Created June 12, 2011 09:48
Twitter Anywhere Authentication
<?php
namespace Security\Authentication;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Http\Authentication\AuthenticationFailureHandlerInterface;
class AjaxFailureHandler implements AuthenticationFailureHandlerInterface
<?php
protected function _editAction(Post $post)
{
$em = $this->get('doctrine.orm.default_entity_manager');
$factory = $this->get('form.factory');
$form = $factory->create(new PostFormType());
$form->setData($post);
if ($this->get('request')->getMethod() === 'POST') {
activerehashing yes
appendfsync everysec
appendonly no
bind 0.0.0.0
daemonize yes
databases 1
dbfilename dump_1.rdb
dir /var/redis/
glueoutputbuf yes
hash-max-zipmap-entries 512