Skip to content

Instantly share code, notes, and snippets.

View Sobak's full-sized avatar
🇵🇱

Maciej Sobaczewski Sobak

🇵🇱
View GitHub Profile
@logarytm
logarytm / .js
Last active August 11, 2018 19:47
range() without loops or recursion… or is it?
(f => (g => g(g))(g => f(x => g(g)(x))))((x) => ([a, b, c = 1]) => a === b ? [a] : [a, ...x([a + c, b, c])])([1, 10])
// [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
// Note: Functional programmers and mathematicians have known this trick
// for decades under the name of a Y combinator. I did not invent this.
// I recommend deciphering this thing on your own, though.
@kadet1090
kadet1090 / Carbon.php
Created March 30, 2016 15:09
Simple month padder for calendars etc.
<?php
use Carbon\Carbon;
use Carbon\CarbonInterval;
/**
* Pads given month to whole weeks.
*
* @param int $year Year
* @param int $month Month
* @param int|string $firstDay First day of week index (0 for sunday) or name.
https://github.com/a1phanumeric/PHP-MySQL-Class
https://github.com/aaronpk/Google-Voice-PHP-API
https://github.com/abhinavsingh/JAXL
https://github.com/abraham/twitteroauth
https://github.com/achingbrain/php5-akismet
https://github.com/adamgriffiths/ag-auth
https://github.com/adlawson/vfs.php
https://github.com/adoy/PHP-OAuth2
https://github.com/aerialls/Plum
https://github.com/afreiday/php-waveform-png
@mnapoli
mnapoli / reference.yml
Last active January 12, 2023 00:08
Doctrine YAML configuration reference
# Inspired from http://blog.hio.fr/2011/09/17/doctrine2-yaml-mapping-example.html
MyEntity:
type: entity
repositoryClass: MyRepositoryClass
table: my_entity
namedQueries:
all: "SELECT u FROM __CLASS__ u"
# Class-Table-Inheritance