Skip to content

Instantly share code, notes, and snippets.

View 4e1e0603's full-sized avatar
🎯
I may be slow to respond.

David Landa 4e1e0603

🎯
I may be slow to respond.
  • Prague, Czech Republic
View GitHub Profile
@brainrake
brainrake / buttons.js
Created January 12, 2017 22:08
model-view-update in js
<html>
<body>
<script src="https://gitcdn.xyz/repo/Matt-Esch/virtual-dom/master/dist/virtual-dom.js"></script>
<script>
var h = require('virtual-dom/h');
var diff = require('virtual-dom/diff');
var patch = require('virtual-dom/patch');
var createElement = require('virtual-dom/create-element');
@n-s-k
n-s-k / OOP_F2003_Part_2.md
Last active January 20, 2025 10:40
Object-Oriented Programming in Fortran 2003 Part 2: Data Polymorphism

Object-Oriented Programming in Fortran 2003 Part 2: Data Polymorphism

Original article by Mark Leair, PGI Compiler Engineer

Note: This article was revised in March 2015 and again in January 2016 to bring it up-to-date with the production software release and to correct errors in the examples.

This is Part 2 of a series of articles:

@n-s-k
n-s-k / OOP_F2003_Part_1.md
Last active January 20, 2025 10:40
Object-Oriented Programming in Fortran 2003 Part 1: Code Reusability
@holkasepsem
holkasepsem / eukliduv-algoritmus.md
Created December 19, 2016 16:54
Výpočet největšího společného dělitele pomocí Euklidova algoritmu

#Euklidův algoritmus

Začnu tedy tím, co jsem se dočetla zajímavýho. 📖 Euklidův algoritmus byl napsán už asi 300 let př. n. l. a to panem matematikem Euklidem v knize Základy. Používá se pro výpočet největšího společného dělitele (greatest common divisor) přirozených čísel. Existuje taky Rozšířený Euklidův algoritmus, ale o tom zas jindy. Teď už matematika!

Příklad: Mám číslo 21 a 12

  1. krok: 21 / 12 = 1 , zbyde 9
@zharro
zharro / DateTimeRange.cs
Last active April 22, 2018 05:13
Value object simple example and base class. Base class comes from @vkhorikov (https://github.com/vkhorikov/DddInAction/tree/master/DddInPractice.Logic/Common)
using System;
class DateTimeRange : ValueObject<DateTimeRange>
{
public DateTime Start { get; }
public DateTime End { get; }
public DateTimeRange(DateTime start, DateTime end)
{
Start = start;
@mpneuried
mpneuried / Makefile
Last active February 4, 2025 22:28
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@bellbind
bellbind / fragment.glsl
Last active January 31, 2024 14:56
[webgl2]example for webgl2 (with glsl3)
#version 300 es
precision highp float;
//invariant gl_FragCoord;
uniform Screen {
vec2 wh;
} screen;
uniform Timer {
int count;
@atoponce
atoponce / gist:07d8d4c833873be2f68c34f9afc5a78a
Last active March 5, 2025 02:08 — forked from tqbf/gist:be58d2d39690c3b366ad
Cryptographic Best Practices

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from

@bsmith89
bsmith89 / .gitattributes
Last active April 5, 2021 23:37
Example files for http://blog.byronjsmith.com/makefile-shortcuts.html, a default makefile for computational research projects
*.ipynb filter=dropoutput_jupyter
*.[tc]sv diff=daff-csv
*.[tc]sv merge=daff-csv
@mrange
mrange / why_fsharp.md
Last active May 7, 2021 13:51
Why F#?

Why F#?

I got inspired to answer the questions posed to F# experts on "Why F#?". I have no claims to be an F# expert but I thought the questions were interesting.

How and when did you get started programming in F#?

I believe I started to look at F# around 2008. I am a language-curious person and was at the time working as a .NET developer so I naturally was excited when discovering F#.

How long did it take before you could code real world apps as much or more productively as in C#?