Skip to content

Instantly share code, notes, and snippets.

View sgtrusty's full-sized avatar
💭
happy im heeeere

Santiago González sgtrusty

💭
happy im heeeere
View GitHub Profile
@sgtrusty
sgtrusty / _no_code_page_.php
Created January 23, 2023 00:49 — forked from Dan-Q/_no_code_page_.php
Hacky PHP to produce a "blank" web page which somehow has content when viewed in Firefox. Sample page at https://danq.me/wp-content/no-code-webpage/, explanation at https://danq.me/nocode
<?php
// half-hearted CSS minification
$css = preg_replace(
array('/\s*(\w)\s*{\s*/','/\s*(\S*:)(\s*)([^;]*)(\s|\n)*;(\n|\s)*/','/\n/','/\s*}\s*/'),
array('$1{ ','$1$3;',"",'} '),
file_get_contents('linked.css')
);
// embed as a data: uri
$base64css = rtrim(strtr(base64_encode($css), '+/', '-_'), '=');
@sgtrusty
sgtrusty / ConditionalBindings.hs
Created October 4, 2022 01:27 — forked from LSLeary/ConditionalBindings.hs
Conditional key bindings for xmonad. WIP.
{-# LANGUAGE StandaloneDeriving, DeriveFunctor, GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
--------------------------------------------------------------------------------
-- Module : XMonad.Actions.ConditionalBindings
-- Description : A framework for producing conditional key bindings.
-- Copyright : (c) 2018 L. S. Leary
-- License : BSD3-style (see LICENSE)
--
-- Maintainer : L. S. Leary
@sgtrusty
sgtrusty / README.txt
Created August 25, 2022 17:53 — forked from CSaratakij/README.txt
Video Wallpaper (hw-accelerate) : Use 'mpv' as a video player backend with 'xwinwrap' to wrap our window to be use as a desktop background
You want to use a live wallpaper in x11?
Great!!...but It come as a cost.
I did experiment with .gif backend and non hardware accelerate backend, It sucks.
CPU usage was so high (40% up just for idle), unacceptable for my laptop.
Running with those backend for such a really long time will slowly turn your laptop into the hot potato.
But don't be upset, we can reduce those cost.
Using the video player with hardware video decoding support can reduce the cost.
@sgtrusty
sgtrusty / Install i3 on arch.sh
Created August 9, 2022 15:23 — forked from chreniuc/Install i3 on arch.sh
Steps i followed to install arch + i3
timedatectl set-ntp true
timedatectl set-timezone Europe/Bucharest
fdisk /dev/sda
########################################
n 1G pentru /boot /dev/sda1
a - Flag it as bootable
n - 4G pentru swap /dev/sda3
n - 70G pentru / /dev/sda2
@sgtrusty
sgtrusty / arch-i3gaps-install.md
Created August 9, 2022 15:23 — forked from fjpalacios/arch-i3gaps-install.md
Arch + i3-gaps Install Guide

Arch + i3-gaps Install Guide

First set up your keyboard layout. For example, in Spanish:

   # loadkeys es

For a list of all acceptable keymaps:

   # localectl list-keymaps
@sgtrusty
sgtrusty / arch-i3gaps-install.md
Created August 6, 2022 00:54 — forked from m4jrt0m/arch-i3gaps-install.md
Arch + i3-gaps Install Guide

Arch + i3-gaps Install Guide

First set up your keyboard layout. For example, in Spanish:

   # loadkeys es

For a list of all acceptable keymaps:

   # localectl list-keymaps
@sgtrusty
sgtrusty / website-useful-codes.md
Last active February 9, 2021 01:39
Useful codes to use on the internet

useful codes to use on the internet

You can use these on the inspector's console, or save them as bookmarks by turning them into a oneliner and writing javascript: before the code.

optimization

  • Clear out website content in order to save RAM:
document.body.innerHTML = "";
document.head.innerHTML = "";
@sgtrusty
sgtrusty / npp-theme.xml
Last active December 15, 2020 22:24
Deep Black (sg)
<?xml version="1.0" encoding="Windows-1252" ?>
<!--
Style Name: Deep Black
Description: Based on the theme Port VibrantInk by tyler
File name: Deep Black.xml
Created by: Mariusz Kasperkiewicz
Personalized by: Santiago González
Featured language: SQL, C, C++, Pascal, Php, Css, JavaScript, Html, XML, others?
Note: Feel free to modify this style and re-release it. This style is available under the terms of the GNU Free License.
@sgtrusty
sgtrusty / docker-cmds.md
Created November 17, 2020 14:22
Docker Accesibility

Docker Accessibility & Commands

Networking

  • docker inspect --format "{{ .NetworkSettings.IPAddress }}"
@sgtrusty
sgtrusty / tools.md
Last active October 24, 2020 23:38
useful tools