pacman -S <package> # Install a package
pacman -Sy # Update package list
pacman -Su # Update installed packages
pacman -Ss <query> # Search packages
pacman -R <package> # Remove a package
pacman -Rs <package> # Remove a package and it's unneeded dependencies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Rough modified version of Celeste to darken it up | |
"name": "Celeste Dark", | |
"author": "Sublime HQ Pty Ltd", | |
"variables": | |
{ | |
// These colors are part of the hashed range | |
// and should only be used in non-source | |
"purple": "hsla(260, 50%, 70%, 1)", | |
"blue": "hsla(200, 70%, 55%, 1)", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################# | |
# | |
# Backend | |
# | |
################################# | |
# Backend to use: "xrender" or "glx". | |
# GLX backend is typically much faster but depends on a sane driver. | |
backend = "glx"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Alan Hardman | |
email = alanaktion@gmail.com | |
signingkey = 27A79A65774B4AF0 | |
[push] | |
default = simple | |
[alias] | |
ignored = !git ls-files -v | grep ^[[:lower:]] | |
sync = !sh -c 'git pull --no-edit && git push' | |
st = status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Replace URLs with hyperlinks in an element | |
* | |
* @param {string} selector | |
* @return {void} | |
*/ | |
var linkReplace = function(selector) { | |
var element = document.querySelector(selector); | |
var text = element.innerHTML; | |
text = text.replace(/(https?:\/\/|www\.)[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g, function(match) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$iterations = 1e4; | |
$valid = 'password'; | |
$stored_hash = md5($valid); | |
$test = $arvg[1] ?? 'notvalid'; | |
echo "$iterations iterations\n"; | |
// Run tests | |
$v_start = microtime(true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Output a map | |
* | |
* @param array $map | |
* @param bool $int Round output to integer values | |
*/ | |
function out(array $map, $int = true) { | |
foreach($map as $r) { |
These Pacman hooks can be used to keep old kernel modules active without rebooting. This can work around issues like new USB devices and Docker images not working properly after a kernel upgrade, but before a reboot.
Add the files to /etc/pacman.d/hooks
to enable the functionality. It works by making a backup of your current kernel's /lib/modules/...
directory before the new kernel is installed, and then moving it back to the /lib/modules
directory after the installation completes, working around the default behavior of deleting the old modules.
You can manually clean up the files after a reboot if you're concerned about the disk space used.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"strings" | |
"time" | |
) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -rupN mage_org/app/code/core/Mage/Catalog/Model/Url.php src_shop/app/code/core/Mage/Catalog/Model/Url.php | |
--- mage_org/app/code/core/Mage/Catalog/Model/Url.php 2013-11-19 00:48:25.679009391 +0100 | |
+++ src_shop/app/code/core/Mage/Catalog/Model/Url.php 2013-11-19 00:49:24.188005601 +0100 | |
@@ -643,13 +643,24 @@ class Mage_Catalog_Model_Url | |
$this->_rewrite = $rewrite; | |
return $requestPath; | |
} | |
+ | |
+ // avoid unnecessary creation of new url_keys for duplicate url keys | |
+ $noSuffixPath = substr($requestPath, 0, -(strlen($suffix))); |
NewerOlder