Skip to content

Instantly share code, notes, and snippets.

View flavioheleno's full-sized avatar
:octocat:

Flávio Heleno flavioheleno

:octocat:
View GitHub Profile
@YoEight
YoEight / improve_fonts.md
Created January 15, 2021 10:11 — forked from j1cs/improve_fonts.md
Improve fonts archlinux

Improve Fonts

Newest

Make your Arch fonts beautiful easily! This is what I do when I install Arch Linux to improve the fonts.

You may consider the following settings to improve your fonts for system-wide usage without installing a patched font library packages (eg. Infinality):

Install some fonts, for example:
sudo pacman -S ttf-dejavu ttf-liberation noto-fonts

@dianaarnos
dianaarnos / profilers.md
Last active February 2, 2021 13:56
Profilers - ref

A Evolução de Profilers e Tracers na Netflix - Martin Spier - https://www.youtube.com/watch?v=cgtfkoUH_Hk
analysis tools for Linux ftrace and perf_events - https://github.com/brendangregg/perf-tools
Open source on-host performance monitoring framework - https://github.com/Netflix/vector
Webinar: PHP Profiling with Xdebug - https://www.youtube.com/watch?v=V5MYWBBAMA4
Fundamentals of Performance Profiling - https://smartbear.com/learn/code-profiling/fundamentals-of-performance-profiling/
Sampling profiler for PHP - https://github.com/nikic/sample_prof
phpspy - https://github.com/adsr/phpspy
Introduction to Software Engineering/Testing/Profiling - https://en.wikibooks.org/wiki/Introduction_to_Software_Engineering/Testing/Profiling
Profiling (computer programming) - https://en.wikipedia.org/wiki/Profiling_(computer_programming)
What Is Deterministic Profiling? - https://docs.python.org/3.5/library/profile.html#what-is-deterministic-profiling

@swinton
swinton / README.md
Last active May 14, 2024 10:06
Automatically sign your commits from GitHub Actions, using the REST API

Verified commits made easy with GitHub Actions

image

So you want to commit changes generated by a GitHub Actions workflow back to your repo, and have that commit signed automatically?

Here's one way this is possible, using the REST API, the auto-generated GITHUB_TOKEN, and the GitHub CLI, gh, which is pre-installed on GitHub's hosted Actions runners.

You don't have to configure the git client, just add a step like the one below... Be sure to edit FILE_TO_COMMIT and DESTINATION_BRANCH to suit your needs.

#!/bin/bash
###
### my-script — does one thing well
###
### Usage:
### my-script <input> <output>
###
### Options:
### <input> Input file to read.
### <output> Output file to write. Use '-' for stdout.

How to setup a practically free CDN using Backblaze B2 and Cloudflare

⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,

Recon and Attack Vectors from My Logs

This document contains excerpts from my web server logs collected over a period of 7 years that shows various kinds of recon and attack vectors.

There were a total of 37.2 million lines of logs out of which 1.1 million unique HTTP requests (Method + URI) were found.

$ sed 's/^.* - - \[.*\] "\(.*\) HTTP\/.*" .*/\1/' access.log &gt; requests.txt
@namoshizun
namoshizun / regret_matching.py
Created July 14, 2017 01:03
Use regret matching to play rock-paper-scissors
from __future__ import division
from random import random
import numpy as np
import pandas as pd
'''
Use regret-matching algorithm to play Scissors-Rock-Paper.
'''
class RPS:
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Subscriptions - freek@spatie.be</title>
</head>
<body>
<outline text="PHP" title="PHP">
<outline htmlUrl="http://frederickvanbrabant.com" title="frederickvanbrabant.com" xmlUrl="http://frederickvanbrabant.com/feed.xml" type="rss" text="frederickvanbrabant.com"/>
<outline htmlUrl="http://mattallan.org" title="mattallan.org" xmlUrl="http://mattallan.org/feed.xml" type="rss" text="mattallan.org"/>
<outline title="asked.io" xmlUrl="https://asked.io/rss" type="rss" text="asked.io"/>
@guilhermeblanco
guilhermeblanco / debug-fpm-segfaut.md
Created June 8, 2016 15:59
Debugging PHP-FPM segfaults

Assuming PHP is compiled with debug enabled.

$ gdb /usr/sbin/php-fpm

Then:

r --nodaemonize --fpm-config /etc/php7/fpm/php-fpm.conf