start new:
tmux
start new with session name:
tmux new -s myname
#!/usr/bin/perl | |
use common::sense; | |
sub D($) { | |
for (scalar reverse shift) { | |
s/(\d{3})(?=\d)/$1 /g; | |
return scalar reverse; | |
} | |
} |
#!/usr/bin/env perl | |
use common::sense; | |
use ojo; | |
die "Usage: $0 <podcast url>" unless @ARGV; | |
b(g( shift )->dom->find("enclosure[url]")->each(sub { | |
local $_ = shift->attrs->{url}; | |
say if /\.mp3$/; | |
})); |
#!/usr/bin/env perl | |
BEGIN { $ENV{MOJO_MAX_MESSAGE_SIZE} = 50 * 1024 * 1024; } | |
use Mojolicious::Lite; | |
my $conf = { path => 'data/uploads/', ext => qr/\.(?i:mp3|wav|wma|ogg)$/ }; | |
post '/uploadify/check' => sub { | |
my $self = shift; | |
my $param = $self->req->params->to_hash; |
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |
#!/usr/bin/env perl | |
use 5.12.0; | |
use Mojo::UserAgent; | |
use Compress::Zlib; | |
my $ua = Mojo::UserAgent->new; | |
$ua->on( start => sub { | |
my ( $ua, $tx ) = @_; |
#!/bin/bash | |
# | |
# Copyright (c) 2015, Intel Corporation | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# | |
# * Redistributions of source code must retain the above copyright notice, | |
# this list of conditions and the following disclaimer. | |
# * Redistributions in binary form must reproduce the above copyright |
Previous versions used homebrew to install the various versions. As suggested in the comments, it's better to use pyenv
instead. If you are looking for the previous version of this document, see the revision history.
$ brew update
$ brew install pyenv
$ pyenv install 3.5.0
$ pyenv install 3.4.3
$ pyenv install 3.3.6
$ pyenv install 3.2.6
$ pyenv install 2.7.10
$ pyenv install 2.6.9
I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.
What I decided on was the following: put your secret information into a vars
file, reference that vars
file from your task
, and encrypt the whole vars
file using ansible-vault encrypt
.
Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.