Here are a few notes I’ve made when using LaTeX:
Hyphens
For two literal hyphens, separate them with {}
, for example:
The \texttt{-{}-delete} flag should be set.
Underscores
Underscores are special; escape them if you want to use them literally:
Check the \texttt{authorized\_keys} file.
Working with Perl’s references can sometimes be confusing. This document illustrates several ways to efficiently take a slice of a hash reference.
Here is a hash reference and an array of keys called @order
:
my $row = { foo => 'bar',
baz => 'blech',
one => 'uno',
tres => 'three',
cuatro => 'four or so' };
my @order = qw(one tres cuatro baz foo);
Here is one way to get a list of values in the order of @order
:
Some notes about git
. As with all my technical posts, some or all of this may be out of date. Consider it, then, courage to believe that there may be a solution to your problem in terms you can understand.
I have a local repository I want to make into a remote repository
Here’s our local repository:
local $ git init .
local $ git add .
local $ git commit . -m "- initial commit"
Nice. Now make an empty repo on the remote server:
Some notes I kept when I was learning how to use yum
.
Installing a package that has been excluded
The file /etc/yum.conf
may contain an ’excludes’ line that will disallow updates of any of packages listed. To bypass this, you can comment out those packages in /etc/yum.conf
, or you can one-off it like this:
yum --disableexcludes all install gcc
Finding which repo has the file you need
yum provides '*apxs*'
You may need to add ‘–disableexcludes all’ too.
Here are some notes I keep for myself when I play with iptables
(I don’t use it often enough to remember how it works):
List all rules
# iptables -L
See the rules and their numbers
# service iptables status
Delete a rule
# iptables -D CHAIN NUM
E.g.:
# iptables -D INPUT 12
Add a new rule at the bottom of the chain
# iptables -A INPUT -i eth0 -p tcp --dport 8888 -j ACCEPT
Insert a new rule in a particular place
This inserts a rule in position 6; the rule that was formerly in 6th position will be bumped down (and all rules below it):
From “Ratatouille”, bonus DVD:
Anybody can cook. It’s just you have to have the desire, the determination, to make something that you’re going to feel proud to give to somebody to have that emotional connection with somebody. I think you have to be emotionally attached to what you’re doing.
And the food can be so inspiring. It comes in in its raw form, and you think, “Ok, what am I going to do with this?” What are we looking at when we’re defining a new dish? We’re really looking at the end product. What do we want to see in the dish, what do we want to feel in our mouth, what do we want to smell, what do want to taste? And then we work backwards. In establishing the different techniques or the different products that we’re going to use, that will result in that end.