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
# I have issues with OS X's defaults. Luckily, most are easy to change. | |
# This is heavily based on saetia's gist: https://gist.github.com/saetia/1623487 | |
# Disable autocomplete, which effectively disables that really stupid Escape key autocomplete handler | |
defaults write -g NSUseSpellCheckerForCompletions -bool false | |
# Disable window animations | |
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false | |
# Expand save panel by default |
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
/* This is a hacky stylesheet for making GPM not so ugly. */ | |
/* Fix GPMDB's playlist nav on dark themes */ | |
#playlist-drawer paper-header-panel[at-top] paper-toolbar:not([style-scope]):not(.style-scope), | |
#playlist-drawer .autoplaylist-section, | |
#playlist-drawer #recent-playlists-container { | |
border-bottom-color: <<BACK_SECONDARY>>; | |
} | |
/* Remove Hero image */ |
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) { |
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
#!/usr/bin/env php | |
<?php | |
if (empty($argv[1]) || $argv[1] == '-h') { | |
exit ("Usage: markov <input file> [words] [prefix] [minWords]\n"); | |
} | |
$text = file_get_contents($argv[1]); | |
$map = map($text); | |
$words = $argv[2] ?? 20; | |
$minWords = $argv[4] ?? 10; |
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 | |
/** | |
* Blur values in both directions | |
* @param resource $src | |
* @param integer $radius | |
* @return resource | |
*/ | |
function blur($src, $radius) { | |
return bVert(bHoriz($src, $radius), $radius); |
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
#!/bin/bash | |
# This script is meant to be run on a fresh install of Antergos with Xfce | |
function prompt() { | |
echo -n "$1 [y/n] " | |
read prompt_response | |
if [ $prompt_response == 'y' ]; then | |
return 0 | |
else | |
return 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
{ | |
"autoclose": true, | |
"autoindent": true, | |
"autosave": false, | |
"colorcolumn": 80, | |
"colorscheme": "monokai", | |
"cursorline": true, | |
"eofnewline": true, | |
"ignorecase": false, | |
"indentchar": " ", |