Skip to content

u/WishCow

In this archive from Aug 2011 to Feb 2024

14
posts
418
comments
0
media
1.5k
score

Top posts

Optimising a PHP site with KCacheGrind and XDebug

I'm not sure if linking a blog post by yourself is okay, the faq says not to frequently link to your own content, I hope you let this one slip by. I just started my own blog (deployed an hour ago), and an article that you might be interested in is Optimising a PHP site with KCacheGrind and XDebug. I...

11 points5 comments
Open on Reddit

Hook into pacman somehow?

I know that pacman does not support triggers/hooks, but how does mkinitcpio launch after every kernel update? The reason I'm asking, is because I'd like to have my own initcpio image rebuilt, and a package recompiled (acpi_call, for turning off the nvidia gpu in my laptop), after every kernel update...

9 points16 comments
Open on Reddit

Top comments

In php.ini, or better, .htaccess if it's apache and you have allowoverride options:

php_value auto_prepend_file some_random_file.php

and inside some_random_file:

if (rand(0, 20) > 19) echo ' ';

Will cause "headers already sent", but only /sometimes/. You could replace it with some invisible utf8 character, so it doesn't show up in the browser's show source either.

65 points

Grub can boot iso files as well, so you don't have to sacrifice a whole partition for this. As an example:

  • create a new partition
  • assign the label "isos" to it
  • put the arch iso on it in some folder eg. /iso/archlinux-2021.12.01-x86_64.iso
  • edit /etc/grub.d/40_custom

x

menuentry 'archlinux-2021.12.01' {
  search --set root -l isos
  set isofile='/iso/archlinux-2021.12.01-x86_64.iso'
  set imgdevpath='/dev/disk/by-label/isos'
  loopback loop ($root)/$isofile
  linux (loop)/arch/boot/x86_64/vmlinuz-linux archisodevice=/dev/loop0 img_dev=$imgdevpath img_loop=$isofile earlymodules=loop
  initrd (loop)/arch/boot/x86_64/initramfs-linux.img
}

Regenerate grub.cfg.

48 points

Subreddits

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.