Skip to content

Instantly share code, notes, and snippets.

View ameuret's full-sized avatar

Arnaud Meuret ameuret

View GitHub Profile
@katef
katef / life-utf8.c
Last active May 2, 2024 20:13
XBM to UTF-8 braille image things
/*
* John Conway's Game of Life.
*
* This is written for POSIX, using Curses. Resizing of the terminal is not
* supported.
*
* By convention in this program, x is the horizontal coordinate and y is
* vertical. There correspond to the width and height respectively.
* The current generation number is illustrated when show_generation is set.
*
@Ikariusrb
Ikariusrb / gaussian_random.rb
Last active August 7, 2020 04:24
Ruby RNG that returns a normal distribution between two integers
# MIT License
# Copyright (c) 2020 Ross Becker
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
convert -background none -fill black -font font.ttf -pointsize 140 label:'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789`~!@#$\%^&*()-_+={}[]|\\,.<>?/:;“"‘'"'" font_texture.png
@krisleech
krisleech / renew-gpgkey.md
Last active April 22, 2024 20:13
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

// CNC-v3.2.scad - Open source CNC machine
// Project page: www.HomoFaciens.de
// Date: 2016-10-11
// Author: Norbert Heinz
// Modified by Unrud <unrud@outlook.com> (2018-10-08)
// Display Settings
SHOW_DRILLHOLES = false;
SHOW_BALL_BEARINGS = true;
@hexagon5un
hexagon5un / hull_pcb_case.scad
Created February 4, 2018 22:16
Create a PCB Caddy with OpenSCAD's hull() Command
use <hull.scad>
w = 66.35;
l = 79;
pin_locations = [ [-w/2, -l/2, 0], [-w/2, l/2, 0],
[ w/2, -l/2, 0], [ w/2, l/2, 0] ];
thickness = 1;
$fn = 24;
@sigmike
sigmike / rmagick_arch.bash
Created January 9, 2018 15:52
Install rmagick with imagemagick 6 on arch
sudo pacman -S libmagick6
PKG_CONFIG_PATH=/usr/lib/imagemagick6/pkgconfig gem install rmagick
# or with bundler:
PKG_CONFIG_PATH=/usr/lib/imagemagick6/pkgconfig bundle install
@ecliptik
ecliptik / aisle.txt
Last active January 20, 2022 09:46
Aisle Strings
Resident data ends at 36c4, program starts at 36c4, file ends at 1dd10
Starting analysis pass at address 36c2
End of analysis pass, low address = 36c4, high address = dffc
[Start of code]
Main routine R0001, 0 locals
@fidothe
fidothe / pdfx.rb
Last active October 10, 2023 15:57
Worked example for creating a PDF/X-1a:2003 document with Prawn
require 'prawn'
require 'prawn/measurements'
# I have a small collection of links to the resources I used to figure all
# this out: http://pinboard.in/u:fidothe/t:pdfx
module PDFX
class PageBox
include Prawn::Measurements
attr_reader :bleed_mm
@lfender6445
lfender6445 / gist:9919357
Last active May 2, 2024 22:40
Pry Cheat Sheet

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger