Skip to content

Instantly share code, notes, and snippets.

View danilopinotti's full-sized avatar
Possibly drinking coffee

Danilo Pinotti danilopinotti

Possibly drinking coffee
View GitHub Profile
@CViniciusSDias
CViniciusSDias / socket-server.php
Last active March 12, 2021 20:49
Estudo sobre stream_select
<?php
$socket = stream_socket_server("tcp://0.0.0.0:8000", $errno, $errstr);
if (!$socket) {
var_dump($errno, $errstr);
exit(1);
}
while ($con = stream_socket_accept($socket)) {
- Programming Elixir https://pragprog.com/book/elixir16/programming-elixir-1-6
- Programming Phoenix https://pragprog.com/book/phoenix14/programming-phoenix-1-4
- The Little Elixir & OTP Guidebook https://www.manning.com/books/the-little-elixir-and-otp-guidebook
- https://elixirschool.com/en/
- https://elixir-lang.org/
- https://www.phoenixframework.org/
- https://exercism.io/my/tracks/elixir (tem exercicios em elixir e tem mentor que te da feedback, gratuito)
- https://confreaks.tv/videos/elixirconfeu2016-from-a-ruby-on-rails-monolith-to-elixir-and-elm-microservices
- https://confreaks.tv/videos/railsconf2016-activerecord-vs-ecto-a-tale-of-two-orms
- https://confreaks.tv/videos/elixirconf2014-rise-of-the-phoenix-building-an-elixir-web-framework
@pyldin601
pyldin601 / tailrecursion.php
Last active August 18, 2023 11:20 — forked from beberlei/tailrecursion.php
PHP Tail Recursion
<?php
function tail($fn)
{
$underCall = false;
$pool = [];
return function (...$args) use (&$fn, &$underCall, &$pool) {
$result = null;
$pool[] = $args;
@msurguy
msurguy / List.md
Last active April 30, 2024 15:14
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):

@epicserve
epicserve / redis_key_sizes.sh
Last active February 21, 2024 18:30
A simple script to print the size of all your Redis keys.
#!/usr/bin/env bash
# This script prints out all of your Redis keys and their size in a human readable format
# Copyright 2013 Brent O'Connor
# License: http://www.apache.org/licenses/LICENSE-2.0
human_size() {
awk -v sum="$1" ' BEGIN {hum[1024^3]="Gb"; hum[1024^2]="Mb"; hum[1024]="Kb"; for (x=1024^3; x>=1024; x/=1024) { if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x]; break; } } if (sum<1024) print "1kb"; } '
}