Skip to content

Instantly share code, notes, and snippets.

View JeffIrwin's full-sized avatar
:octocat:
tacocattacocat

Jeff Irwin JeffIrwin

:octocat:
tacocattacocat
View GitHub Profile
@JeffIrwin
JeffIrwin / Dockerfile
Created July 19, 2025 23:06
Build a minimal boost example linking to a subset of boost libs
## Both rocky versions work
#FROM rockylinux:8
FROM rockylinux:9
# This file builds a subset of boost from source and then builds and runs a
# small example program which links to boost
#
# Reference: https://www.boost.org/doc/user-guide/getting-started.html
@JeffIrwin
JeffIrwin / Dockerfile
Created July 19, 2025 02:04
Build boost from source on rocky linux 9 in docker
FROM rockylinux:9
# This file builds boost "from source" (actually from a release tarball, not a
# direct git clone) and then builds and runs a small example program which links
# to boost
#
# Reference: https://www.boost.org/doc/user-guide/getting-started.html
#==============================================
@JeffIrwin
JeffIrwin / Dockerfile
Created May 21, 2025 00:46
Build curl from source on rocky linux 8 in docker
FROM rockylinux:8
#FROM rockylinux:9
WORKDIR /workdir
RUN yum update -y && \
yum install -y \
autoconf \
automake \
@JeffIrwin
JeffIrwin / hello.r
Created January 8, 2022 16:11
Messing around with R
# hello.r
# Windows one-time setup (requires choco):
#
# choco install R
#
# Run this from a shell:
#
# "/c/Program Files/R/R-4.1.2/bin/Rscript.exe" hello.r
@JeffIrwin
JeffIrwin / array.f90
Created September 29, 2020 21:14
Hot take: an array is a function
module mymodule
integer, parameter :: n = 6
integer, parameter :: myarray(n) = [1, 1, 2, 3, 5, 8]
contains
integer function myfunc(input)
@JeffIrwin
JeffIrwin / asc2bin.sce
Created January 23, 2020 01:54
Text to/from binary conversion in Scilab
clear
clc
xdel(winsid())
asc = 'send help'
//==============================================================================
bin = ''
subroutine eniuq(t)
character(len = :), allocatable :: s
character(len = *) :: t
integer :: i
s = ''
do i = 1, len(t)
if (t(i:i) == char(10)) then
s = s//char(34)//'//char(10)// &'//t(i:i)//' '//char(34)
else
s = s//t(i:i)
program p
character(len = *), parameter :: c = '' &
//' //''''\n' &
//'\n' &
//' character(len = :), allocatable :: d\n' &
//'\n' &
//' integer :: i\n' &
//'\n' &
//' print ''(a)'', "program p"\n' &
@JeffIrwin
JeffIrwin / triplePalindrome.py
Created September 17, 2018 23:22
Given an integer, find three palindromes that sum to it.
import sys
if len(sys.argv) != 2:
print("Usage:")
print("python3 triplePalindrome.py 30041777")
sys.exit(-1)
nStr = sys.argv[1]
n = int(nStr)