Skip to content

Instantly share code, notes, and snippets.

View rredpoppy's full-sized avatar

Adrian Rosian rredpoppy

View GitHub Profile
@terma
terma / ec2-spot-github-self-hosted-runners.md
Created January 28, 2020 09:32
AWS EC2 Spot Instances for GitHub Self-hosted runners

AWS EC2 Spot Instances for GitHub Self-hosted runners

Below CloudFormation stack which runs GitHub Self-hosted runners on EC2 Spot Instances managed by AutoScalingGroup. It automatically register new instances as self-hosted runners and removes them when Spot is interrupted.

How to use?

  1. Download YML below into file
  2. Create AWS CloudFormation stack
    • Provide values for parameters
  • If you need to install smt in UserData fill stack parameter AdditionalUserData
@alexanderjamesking
alexanderjamesking / RDF in Turtle to PDF Graph
Created September 15, 2018 10:11 — forked from crstn/RDF in Turtle to PDF Graph
Create a graph visualization from an RDF file using http://librdf.org/raptor/ and http://www.graphviz.org.
rapper -i turtle -o dot model.ttl | dot -Tpdf -omodel.pdf
@RaheelYawar
RaheelYawar / bloom.fragment.glsl
Created June 22, 2018 08:36
Three.js (GLSL) basic bloom shader
// THREEjs build-in uniforms and attributes (Fragment)
// uniform mat4 viewMatrix - camera.matrixWorldInverse
// uniform vec3 cameraPosition - camera position in world space
varying vec2 vUv;
uniform sampler2D albedo;
void main() {
@samuelantonioli
samuelantonioli / setup.sh
Last active July 4, 2021 23:24
wire-server setup using fake dependencies
#!/bin/bash
# chmod +x setup.sh && ./setup.sh
# [!] only for testing! this is not stable or secure
# it takes some hours.
# it is available under http://<server-ip>:8080
#
# make sure that you run ubuntu 16.04
# you need minimum 25gb (10gb filled with build dependencies)
@yellowbyte
yellowbyte / compiling_asm.md
Last active March 8, 2024 21:44
how to assemble assembly with NASM assembler to 32-bit or 64-bit ELF binary with or without libc

32-bit ELF binary

how to assemble and link:

nasm -f elf32 -o <filename>.o <filename>.asm
ld -m elf_i386 -o <filename> <filename>.o

template code (hello world):

section .text
global _start

Applied Functional Programming with Scala - Notes

Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
@younes200
younes200 / install.sh
Last active January 21, 2018 07:52
UV4L + Webrtc
curl http://www.linux-projects.org/listing/uv4l_repo/lrkey.asc | sudo apt-key add -
sudo vi /etc/apt/sources.list
cat /etc/apt/sources.list
deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
deb http://www.linux-projects.org/listing/uv4l_repo/raspbian/ wheezy main
sudo apt-get update
sudo apt-get install uv4l-webrtc
sudo apt-get install uv4l-raspicam-extras
sudo service uv4l_raspicam restart
@queertypes
queertypes / FreeCoFree.hs
Created June 5, 2015 17:11
Exploring Free Monads, Cofree Comonads, and Pairings: DSLs and Interpreters
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-
Explores Free Monads (DSLs) and Cofree Comonads (interpreters) and
their relationship.
Most of the code in this file comes from (1) below. Only minor
modifications are made - semantics are preserved.
@abailly
abailly / gist:84a54ace82a67c3c8aab
Created June 4, 2015 17:31
Tentative composition of Free DSLs and Cofree Interpreters
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverlappingInstances #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeOperators #-}
-- |Tentative at composing @Free@ and @Cofree@ things to separate DSL fragments and interpreters
-- the goal is to be able to define separately DSL fragments, and their interpretation(s), and
-- combine them at will.
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE UndecidableInstances #-}
module Fix where
-- Definitions:
--
-- If (μF,inF) is the initial F-algebra for some endofunctor F