Skip to content

Instantly share code, notes, and snippets.

View j3j5's full-sized avatar
🤷‍♂️

Julio J. j3j5

🤷‍♂️
View GitHub Profile
@thesamesam
thesamesam / xz-backdoor.md
Last active April 18, 2024 21:45
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is still a new situation. There is a lot we don't know. We don't know if there are more possible exploit paths. We only know about this one path. Please update your systems regardless.

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

@Pingu501
Pingu501 / gitlab-artifacts-cleanup.py
Created December 9, 2021 11:22
GitLab Artifacts Clean-Up
"""
This is a small python script to clear up old gitlab build artifacts.
There are 3 variables you should modify:
* base_url: path to your gitlab
* access_token: your personal access token to make gitlab api calls
* delete_everything_older_than: configure the timedelta as you wish
!!IMPORTANT!!
By default this script does only make dry-runs and does not actually delete any files!
@IanColdwater
IanColdwater / twittermute.txt
Last active April 3, 2024 19:43
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active April 10, 2024 20:23
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@magicdude4eva
magicdude4eva / zsh-syntax-highlighting paste performance improvement
Last active April 19, 2024 14:03
zsh-syntax-highlighting paste performance improvement
Add the following in .zshrc:
...
plugins=(osx git zsh-autosuggestions zsh-syntax-highlighting zsh-nvm docker kubectl)
...
### Fix slowness of pastes with zsh-syntax-highlighting.zsh
pasteinit() {
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
@Billz95
Billz95 / .php_cs.dist
Last active January 15, 2024 02:58
A Customised fixer for PHP-CS-Fixer to use `prettier`'s php plugin to pre-process the code before getting analysed by other fixers. This would enable `php-cs-fixer` to take advantage of `prettier`'s ability of managing long line.
<?php
require_once __DIR__.'/relative/path/to/PrettierPHPFixer/File';
return PhpCsFixer\Config::create()
->registerCustomFixers([
(new PrettierPHPFixer()),
])
->setRules([
'Prettier/php' => true,
@ElectrWeakHyprCharge
ElectrWeakHyprCharge / inumet.py
Last active September 22, 2023 06:12
Tiempo Actual de Inumet
import json
from urllib.request import urlopen
from collections import namedtuple
class Estación(namedtuple('Estación', 'nombre estación id')):
ARTIGAS = 16
RIVERA = 235
MELO = 160
SALTO = 239
YOUNG = 293
@cupracer
cupracer / varnishlog-examples.sh
Last active February 27, 2024 11:11
varnishlog examples (version 4.x)
# filter by request host header
varnishlog -q 'ReqHeader ~ "Host: example.com"'
# filter by request url
varnishlog -q 'ReqURL ~ "^/some/path/"'
# filter by client ip (behind reverse proxy)
varnishlog -q 'ReqHeader ~ "X-Real-IP: .*123.123.123.123"'
# filter by request host header and show request url and referrer header
@snurhussein
snurhussein / PSPPConvert.md
Last active October 31, 2021 23:49
Using PSPP to convert sav files to csv

#Converting SPSS files to csv with PSPP#

Install and open PSPP Use the File menu to open your file (it probably has a .sav extension) Go to File>New>Syntax to open PSPP's command line window

Enter:

@d3v-null
d3v-null / cloak.ovpn
Last active June 28, 2018 00:00
This is an OpenVPN settings file for Cloak. Forked for compatibility the OpenVPN client in ASUS RT routers
client
dev tun
comp-lzo
auth-user-pass
# remote-cert-tls server
server-poll-timeout 10
auth-nocache
auth-retry interact
verb 1
remote openvpn.getcloakvpn.com 443 udp