Skip to content

Instantly share code, notes, and snippets.

View braytac's full-sized avatar

braytac braytac

View GitHub Profile
@probonopd
probonopd / Wayland.md
Last active May 21, 2024 08:47
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

Wayland proponents make it seem like Wayland is "the successor" of Xorg, when in fact it is not. It is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of "windows" (making up incompr

@Gnzlt
Gnzlt / gourcevideo.sh
Created March 6, 2019 13:25
Gource video export command
#!/bin/bash
gource \
-s .03 \
-1280x720 \
--auto-skip-seconds .1 \
--multi-sampling \
--stop-at-end \
--key \
--highlight-users \
@ojgarciab
ojgarciab / gist:32d085858d0a469f6842ee78b82a4666
Last active November 17, 2021 10:47 — forked from ealbinu/gist:3080619
Correo con PHP utilizando mail() codificado en UTF-8
<?php
$correo_destinatario = "";
$nombre_remitente = "";
$correo_remitente = "";
$asunto = "";
$mensaje = "";
/* Hacemos uso de mb_encode_mimeheader para codificar correctamente caracteres especiales */
$headers = 'From: "' . mb_encode_mimeheader($nombre_remitente) . '" <' . $correo_remitente . ">\r\n"
. 'Reply-To: ' . $correo_remitente . "\r\n"
@braytac
braytac / speed_boot
Last active September 26, 2019 14:32
Cosas que no suelo necesitar en el arranque de manjaro/arch
# EN GRUB: desactivar mitigaciones si no me interesan (+perf. Intel)
noibrs noibpb nopti nospectre_v2 nospectre_v1 l1tf=off nospec_store_bypass_disable no_stf_barrier mds=off mitigations=off
pacman -Rsc plymouth
pacman -Rsc mlocate
pacman -Rsc ntp
pacman -Rsc tlp
pacman -Rsc accountsservice
systemctl mask updatedb.service
@daymwk
daymwk / VideoStream.php
Last active September 26, 2019 14:32 — forked from ranacseruet/VideoStream.php
PHP VideoStream class for HTML5 video streaming
<?php
/**
* Description of VideoStream
*
* @author Rana
* Customized by Daym for remote videos
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial
*/
class VideoStream
{
@joseluisq
joseluisq / mysql_query_log.md
Last active May 14, 2024 12:10
How to enable the MySQL/MariaDB general query logs

How to enable the MySQL/MariaDB general query logs

  1. Enter to MySQL/MariaDB server command-line tool (change root with your username and password):
mysql -u root -proot
  1. Set the general log file path:
SET GLOBAL general_log_file='/var/log/mysql/mycustom.log';
@micc83
micc83 / mysqldump.php
Created June 5, 2017 13:17
Simple PHP script to dump a MySql database
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$database = 'db';
$user = 'user';
$pass = 'pass';
$host = 'localhost';
@tayvano
tayvano / gist:6e2d456a9897f55025e25035478a3a50
Created February 19, 2017 05:29
complete list of ffmpeg flags / commands
Originall From: Posted 2015-05-29 http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options
This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full.
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}…
Getting help:
-h — print basic options
-h long — print more options
-h full — print all options (including all format and codec specific options, very long)
@bitsgalore
bitsgalore / loggingGUI.py
Created January 31, 2017 13:43
Minimal threaded GUI application with logging to both text file and ScrolledText widget
#! /usr/bin/env python
import time
import threading
import logging
try:
import tkinter as tk # Python 3.x
import tkinter.scrolledtext as ScrolledText
except ImportError:
import Tkinter as tk # Python 2.x
import ScrolledText

Most downloaded projects

SELECT
  file.project,
  COUNT(*) as total_downloads,
FROM
  TABLE_DATE_RANGE(
    [the-psf:pypi.downloads],
    TIMESTAMP("20160114"),