Skip to content

Instantly share code, notes, and snippets.

View amirouche's full-sized avatar

Amir Amazigh BOUBEKKI amirouche

View GitHub Profile
@lleyton
lleyton / translation.md
Last active January 23, 2024 16:53
(ENG) Open Source Business Challenges and Reality, Rui Ueyama

Open Source Business Challenges and Reality

Original Japanese note here.

Original Author: Rui Ueyama (creator of the mold linker)

Translated by @windowsboy111

Minimally edited by @lleyton

@raysan5
raysan5 / raylib_vs_sdl.md
Last active May 6, 2024 22:09
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

@johnwcowan
johnwcowan / avsl-nutshell.txt
Last active August 29, 2022 16:34
AVSL (A Very {Simple|Small|Safe} Language) in a nutshell
Goals:
Easy to learn and use by beginning programmers
Easy to relearn and use by "perpetual intermediate" programmers
Suitable for use as a front-end language (not in a browser)
Not infuriating to advanced programmers modulo syntax
Support a "professional" syntax
Case insensitive (except strings)
Everything should be as simple as possible but no simpler
High-level design choices:
@kborovik
kborovik / How to use a GPG key for SSH authentication
Created October 8, 2020 12:28
How to use a GPG key for SSH authentication
# How to use a GPG key for SSH authentication
# Tested on Ubuntu 20.04 LTS
# Enable SSH support in gpg-agent:
echo enable-ssh-support > ~/.gnupg/gpg-agent.conf
# Cache GPG & SSH passwords for 24 hours (the reboot will clear the password cache)
echo max-cache-ttl 86440 >> ~/.gnupg/gpg-agent.conf
echo max-cache-ttl-ssh 86440 86440 >> ~/.gnupg/gpg-agent.conf
echo default-cache-ttl 86440 >> ~/.gnupg/gpg-agent.conf
(library (documentation)
(export define/document define-syntax/document
document describe)
(import (rnrs))
(define doc-list '())
(define (document thing description)
(set! doc-list (cons (cons thing (syntax->datum description)) doc-list)))
@edw
edw / json.scm
Last active November 26, 2018 13:55
JSON parsing in Chibi Scheme using combinators
(import (chibi parse))
;; JSON Parsing
;; Edwin Watkeys
;; Nov 25, 2018
;;
;; Example usage:
;;
;; (parse datum "{\"foo\": true, \"bar\" : [0,1,2,3.14, .12]}")
;; => (("foo" #t)
@rain-1
rain-1 / example.tsv
Last active February 6, 2023 16:56
Tab Separated Values file format specification version 2.0
Name Age Address
Paul 23 1115 W Franklin
Bessy the Cow 5 Big Farm Way
Zeke 45 W Main St
@speedplane
speedplane / celery_app.py
Created October 25, 2017 02:02
Celery Autoscaler Based on Memory and System Load
import multiprocessing
import re
from celery import Celery
from celery.worker.autoscale import Autoscaler as CeleryAutoscaler
class DAAutoscaler(CeleryAutoscaler):
# Try to keep the load above this point.
LOAD_MIN = .8
# Try to keep the load below this.
LOAD_MAX = 1.1
@manjula-dube
manjula-dube / ReactiveConf-CFP.md
Last active January 5, 2024 20:17
CFP: Reactive Conf: Jest & Enzyme complement each other.
This is a proposal for ReactiveConf 2017 open call for Lightning talks. If you'd like to make this talk happen, please 🌟 this gist and retweet my tweet. 🙏

If you're on your phone, please request the 🖥 desktop site to star this gist 😇

I would talk about some myths on Jest & Enzyme. Moreover to stop the comparison of Jest and Enzyme. Instead would focus on how they can work together to test well your React Components. The talk would focus on "How Jest and Enzyme complement each other" and can help you test React components in a better way.

  1. If you are writing tests: you are already winning.
  2. If you are not writing tests:let me encourage you to start.
  3. Jest.
  4. Snapshot Testing.
@CMCDragonkai
CMCDragonkai / ogr_iterate.py
Last active August 26, 2023 08:46
GDAL OGR Iterate over all layers, features, fields and geometry #python #gdal #ogr
from osgeo import ogr
data = ogr.Open('/path/to/vector/file')
print('Data Name:', data.GetName())
# get a layer with GetLayer('layername'/layerindex)
for layer in data:
print('Layer Name:', layer.GetName())
print('Layer Feature Count:', len(layer))