Skip to content

Instantly share code, notes, and snippets.

View ljahier's full-sized avatar
🏡
Working from home

Lucas JAHIER ljahier

🏡
Working from home
View GitHub Profile
@def-
def- / mainpage.c
Created February 19, 2015 10:05
CSFML example
#include <SFML/Audio.h>
#include <SFML/Graphics.h>
int main()
{
sfVideoMode mode = {800, 600, 32};
sfRenderWindow* window;
sfTexture* texture;
sfSprite* sprite;
sfFont* font;
@nonbeing
nonbeing / git-deployment.md
Last active November 6, 2024 06:38 — forked from noelboss/git-deployment.md
Simple deployment using git's post-receive hook

Also see: https://gist.github.com/lemiorhan/8912188

Simple automated deployment using git hooks

Here are the simple steps needed to push your local git repository directly to a remote (e.g. prod) server over ssh. This is based on Digital Ocean's Tutorial.

Overview

You are developing in a working-directory on your local machine, let's say on the master branch. Usually people push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use GitHub's webhooks to send a POST request to a webserver to take appropriate actions such as cloning/checking out a branch on the remote (prod) server.

Thread Pools

Thread pools on the JVM should usually be divided into the following three categories:

  1. CPU-bound
  2. Blocking IO
  3. Non-blocking IO polling

Each of these categories has a different optimal configuration and usage pattern.

@fnky
fnky / ANSI.md
Last active November 19, 2024 18:05
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@graninas
graninas / What_killed_Haskell_could_kill_Rust.md
Last active November 5, 2024 02:15
What killed Haskell, could kill Rust, too

At the beginning of 2030, I found this essay in my archives. From what I know today, I think it was very insightful at the moment of writing. And I feel it should be published because it can teach us, Rust developers, how to prevent that sad story from happening again.


What killed Haskell, could kill Rust, too

What killed Haskell, could kill Rust, too. Why would I even mention Haskell in this context? Well, Haskell and Rust are deeply related. Not because Rust is Haskell without HKTs. (Some of you know what that means, and the rest of you will wonder for a very long time). Much of the style of Rust is similar in many ways to the style of Haskell. In some sense Rust is a reincarnation of Haskell, with a little bit of C-ish like syntax, a very small amount.

Is Haskell dead?

@aessing
aessing / install-Cloudflared.sh
Last active November 6, 2023 23:22
Install Cloudlflare daemon (cloudflared) on Linux (Ubuntu) - DNS-over-HTTPS
#!/bin/bash
# =============================================================================
# Install Cloudlflare daemon (cloudflared) on Linux (Ubuntu) - DNS-over-HTTPS
# https://developers.cloudflare.com/1.1.1.1/dns-over-https/cloudflared-proxy/
# https://developers.cloudflare.com/argo-tunnel/downloads
# -----------------------------------------------------------------------------
# Developer.......: Andre Essing (https://www.andre-essing.de/)
# (https://github.com/aessing)
# (https://twitter.com/aessing)
# (https://www.linkedin.com/in/aessing/)
@ljahier
ljahier / app.js
Last active November 5, 2022 01:18
Move all photos from google takeout into one directory.
const { mkdir, readdir, rename, stat } = require('fs/promises');
async function main() {
try {
await mkdir('./photos')
console.debug('Photo directory successfully created');
} catch (err) {
console.debug('Photo directory already exist');
}