Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@acook
acook / _Solus Workarounds.md
Last active October 16, 2023 01:23
Solus Linux workarounds and tutorials. Please let me know if they break or you found a better way.

Solus Workarounds

Solus Linux looks good out of the box and has some good features but lacks the integrations and support of other distros.

Here are some workarounds. Please let me know if they break or you found a better way.

@acook
acook / master_to_main
Created February 25, 2021 05:34
Rename local branch from master to main using git commandline
git branch -m master main
git fetch origin
git branch -u origin/main main
class Potato
def initialize weight
@weight = weight
end
end
def self.Potato *weight
Potato.new weight.first || 1
end
#!/usr/bin/env ruby
class Passwerd
CHARSETS = {
lower: (?a..?z).to_a,
upper: (?A..?Z).to_a,
number: (?0..?9).to_a,
space: [' '],
sym1: (?!..?/).to_a,
sym2: (?:..?@).to_a,
@acook
acook / output.sh
Created November 10, 2015 23:12
First fully successful execution of a script using blacklight's shiny new VM!
$ go run src/github.com/acook/blacklight/*.go examples/cv-text-manipulation.bl
-- 0 : xf8
-- V at offset #0 CV(3): abc
-- 13 : xf4
-- N at offset #13: 1
-- 22 : x2e
-- opword at offset #22: 46 (ato)
package main
import (
"fmt"
"os"
)
func main() {
// go complains: "use of builtin recover not in function call"
//defer cleanup_broken()
@acook
acook / sorcerer_spells_per_day.google_sheets
Created October 15, 2015 00:59
This will calculate a Pathfinder Sorcerer's spells per day including bonus uses. CL is "Caster Level", MOD is "Ability Modifier", and SPELL is "Spell Level".
=if(
SPELL=0,
"∞",
max(
0,
if(
or(
SPELL=1,
gt(CL+1-SPELL*2, 0)
class Foo
end
__END__ unless __FILE__ == $0
raise 'I pity the Foo' unless Foo.name == 'Foo'
@acook
acook / Install RBenv.bash
Last active September 28, 2015 04:20
The process to get a full working rbenv setup.
export RBENV_ROOT="$HOME/.rbenv"
export RBENV_PLUGINS="$RBENV_ROOT/plugins"
git clone https://github.com/sstephenson/rbenv.git "$RBENV_ROOT"
export PATH="$RBENV_ROOT/bin:$PATH"
echo 'export PATH="$RBENV_ROOT/bin:$PATH"' >> ~/.bash_profile
eval "$(rbenv init -)"
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
echo -e "LC_ALL=en_US.UTF-8\nLANG=en_US.UTF-8" > /etc/default/locale
locale-gen "en_US.UTF-8"
dpkg-reconfigure locales
echo -e "nameserver 8.8.8.8\nnameserver 8.8.4.4" > /etc/resolv.conf
apt-get update && apt-get upgrade