Skip to content

Instantly share code, notes, and snippets.

View Pictor13's full-sized avatar
🤹‍♂️
Juggling with curiosity

Igor Pellegrini Pictor13

🤹‍♂️
Juggling with curiosity
  • BerlinOnline Stadtportal GmbH & Co. KG
  • Berlin
View GitHub Profile
@jeyj0
jeyj0 / haskell-crash-course.org
Created September 7, 2020 17:27
Haskell Crash Course

Haskell Crash-Course

Hello, Haskell!

putStrLn

putStrLn "Hello, Haskell!"
@ragboyjr
ragboyjr / AbstractCrudDTOController.php
Last active February 25, 2025 20:07
Easy Admin 3 DTO Crud Controller
<?php
namespace App\EasyAdminExtensions\Controller;
use EasyCorp\Bundle\EasyAdminBundle\Config\Action;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
use EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto;
use EasyCorp\Bundle\EasyAdminBundle\Event\BeforeCrudActionEvent;
use EasyCorp\Bundle\EasyAdminBundle\Event\BeforeEntityPersistedEvent;
use EasyCorp\Bundle\EasyAdminBundle\Event\BeforeEntityUpdatedEvent;
@rbreaves
rbreaves / WaylandUbuntu19.10-AppTitle
Last active October 10, 2024 09:00
Grab wmclass name or Window Name/Title under Wayland with Gnome 3.x
# Single Command, runs 2 calls to gdbus to get the currently active Window from Gnome 3.x
# Escaped so you can copy and paste into terminal directly
gdbus call -e -d org.gnome.Shell -o /org/gnome/Shell -m org.gnome.Shell.Eval global.get_window_actors\(\)[`gdbus call -e -d org.gnome.Shell -o /org/gnome/Shell -m org.gnome.Shell.Eval global.get_window_actors\(\).findIndex\(a\=\>a.meta_window.has_focus\(\)===true\) | cut -d"'" -f 2`].get_meta_window\(\).get_wm_class\(\) | cut -d'"' -f 2
# Unescaped version, will not run
# Broken down into 2 commands.
# Call to Gnome to get the array location of the active Application
gdbus call -e -d org.gnome.Shell -o /org/gnome/Shell -m \
@akhenakh
akhenakh / mapd.nomad
Created November 11, 2019 22:01
Example Nomad deployment
job "mapd" {
datacenters = ["dc1"]
type = "service"
constraint {
operator = "distinct_hosts"
value = "true"
}
update {
max_parallel = 1
min_healthy_time = "10s"
@GiacomoP
GiacomoP / app.js
Last active September 2, 2019 12:33
M5S Rousseau - Admin Frontend app
(function(e) {
function t(t) {
for (var n, s, r = t[0], l = t[1], d = t[2], c = 0, m = []; c < r.length; c++) s = r[c], a[s] && m.push(a[s][0]), a[s] = 0;
for (n in l) Object.prototype.hasOwnProperty.call(l, n) && (e[n] = l[n]);
u && u(t);
while (m.length) m.shift()();
return o.push.apply(o, d || []), i()
}
function i() {
@borekb
borekb / README.md
Last active December 11, 2025 07:08
How to link to headings in GitHub issues and pull requests

How to link to headings in GitHub issues and pull requests

If you have an issue comment / PR description on GitHub, it doesn't automatically get anchors / IDs that you could link to:

Screenshot 2019-07-11 at 13

What I like to do is to add a visible # character like this:

Screenshot 2019-07-11 at 13 42 21

@elemongw
elemongw / forkstats.py
Last active July 22, 2025 06:19
Find most active forks of a project in GitHub. Sorts by most recently pushed
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Collect all forks of a github project and return the most recently pushed.
Any alternatives I could find searched only the most recent forks of a project,
which does not return accurate results for projects with many forks.
Note that the GitHub API has a rate limit of 60 requests per hour for unauthenticated requests.
You can create a personal access token in order to circumvent this, which will raise the limit
@a-r-m-i-n
a-r-m-i-n / Easy Admin Bundle ConfigPass.md
Last active May 27, 2020 13:11
This document describes the process of Symfony's Easy Admin Bundle, to process the given YAML configuration, with registered **ConfigPass** classes.

Easy Admin Bundle ConfigPass

This document describes the process of Symfony's Easy Admin Bundle, to process the given YAML configuration, with registered ConfigPass classes.

The problem

Those ConfigPasses are collections of private methods, which have e.g. action names hardcoded, so you can't reuse the "config auto-magic" for your new actions.

@dimabory
dimabory / gist:56e36474a1bb5573c08f26805a978fb5
Last active July 22, 2023 08:41
General Responsibility Assignment Software Patterns (GRASP)
@anwas
anwas / multiple-php.txt
Last active December 14, 2023 11:03
[Multiple PHP versions on Ubuntu] #php #dev #ispconfig
## Add repository
### https://launchpad.net/%7Eondrej/+archive/ubuntu/php
### https://launchpad.net/~ondrej/+archive/ubuntu/apache2
sudo add-apt-repository ppa:ondrej/php
sudo add-apt-repository ppa:ondrej/apache2
sudo apt-get update
sudo apt-get dist-upgrade