Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
@FredrikAugust
FredrikAugust / README.md
Last active May 12, 2019 01:21
Simple evolutionary algorithm written in Common Lisp that works its way towards a provided sentence.

Hello-algo

To use the program:

  • Install common lisp
  • Make sure it's installed by typing 'clisp'
  • Exec command "clisp path/to/file.lisp population string"
  • Tweak population to find what works best for you
@cachapa
cachapa / gif_creator.sh
Last active April 1, 2022 12:07
Shell script to generate high-quality animated gifs from a video file
#!/bin/bash
# Based on http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
# Requires ffmpeg
filename="${1%.*}"
palette="/tmp/palette.png"
filters="scale=320:-1:flags=lanczos"
ffmpeg -v warning -i "$1" -vf "$filters,palettegen" -y $palette
ffmpeg -v warning -i "$1" -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y "$filename.gif"