Skip to content

Instantly share code, notes, and snippets.

View far-rainbow's full-sized avatar
🏠
Working from home

Pavel E. Petrov far-rainbow

🏠
Working from home
View GitHub Profile
@far-rainbow
far-rainbow / ang1_.bowerrc
Created April 30, 2016 05:34
test PhpStrom v0.1
{
"directory": "app/bower_components"
}
@far-rainbow
far-rainbow / HTML5 Stub
Created September 10, 2017 11:03 — forked from joshuapowell/HTML5 Stub
A generic & empty HTML5 page structure.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="author" content="" />
<meta name="copyright" content="" />
<meta name="robots" content="index, follow" />
function factorial($n)
{
if ($n == 1) {
return $n;
}
return $n * factorial($n-1);
}
function tail_factorial($n, $acc = 1)
{
@far-rainbow
far-rainbow / GLSL-Math.md
Created March 22, 2019 16:35 — forked from patriciogonzalezvivo/GLSL-Math.md
GLSL Math functions

Trigonometry

const float PI = 3.1415926535897932384626433832795;
const float PI_2 = 1.57079632679489661923;
const float PI_4 = 0.785398163397448309616;

float PHI = (1.0+sqrtf(5.0))/2.0;
@far-rainbow
far-rainbow / jar-launcher.md
Created July 13, 2020 16:09 — forked from joewalnes/jar-launcher.md
Make a single file Java jar launcher

This is a little trick to turn an executable Java jar.

It works on all unixy like systems including Linux, MacOS, Cygwin, and Windows Linux subsystem.

Step 1 Start with an all-in-one jar (with entry point and all deps within)

$ ls 
hello.jar
@far-rainbow
far-rainbow / Dockerfile
Created June 5, 2021 19:48 — forked from evansims/Dockerfile
Dockerfile: php-fpm 7.4-fpm alpine w/ gd bz2 intl mbstring redis mongodb xdebug opcache
FROM php:7.4-fpm-alpine
WORKDIR "/application"
# Install essential build tools
RUN apk add --no-cache \
git \
yarn \
autoconf \
g++ \
make \