Skip to content

Instantly share code, notes, and snippets.

# test.yml
---
- hosts: localhost
roles:
- { role: one, role_to_read: 'two' }
# roles/one/tasks/main.yml
---
- debug: msg="ROLE one"
- include_role:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_signed.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_misc.all;
use ieee.numeric_std.all;
use work.SimpletonStdPkg.all;
entity exALU is
@XooR
XooR / crazy_accesslog.pl
Created May 9, 2012 12:42
crazy accesslog parsing
my @al_words= split /\s/, $al_line;
my $time = join " ",@al_words[0..1];
my $client_ip = $al_words[2];
my $referer = $al_words[3];
my $session_id = $al_words[5];
my $time_taken = $al_words[-1];
my $thread_name = $al_words[-2];
my $bytes_received = $al_words[-3];
my $port = $al_words[-4];
@XooR
XooR / simple.m
Created December 7, 2011 19:45
Some cool features of octave/mathlab programming language
% Putting function pointer, that have X, y and lambda taken from environment.
% This is something for what I had to use additional anonymous subroutine in Perl5
[theta, J, exit_flag] = ...
fminunc(@(t)(costFunctionReg(t, X, y, lambda)), initial_theta, options);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% You can have optional parameters in octave/mathlab, cool :)
% Set example_width automatically if not passed in
if ~exist('example_width', 'var') || isempty(example_width)
@XooR
XooR / mapFeature.m
Created December 7, 2011 19:26
Simple feauture polinomial generator
function out = mapFeature(X1, X2)
% MAPFEATURE Feature mapping function to polynomial features
%
% MAPFEATURE(X1, X2) maps the two input features
% to quadratic features used in the regularization exercise.
%
% Returns a new feature array with more features, comprising of
% X1, X2, X1.^2, X2.^2, X1*X2, X1*X2.^2, etc..
%
% Inputs X1, X2 must be the same size
@XooR
XooR / updates.pl
Created November 19, 2011 11:10
yum updates...
#!/usr/bin/env perl
# To list versions before and after update
# it doesn't work yet, it doesn't prints all packages
# only some of them, need some fixing
use strict;
use warnings;
sub extract_name_version {
my ($input_ref) = @_;
@XooR
XooR / Simple
Created October 25, 2011 14:14
Simple