Skip to content

Instantly share code, notes, and snippets.

〰️( ͡~ ͜ʖ ͡°)〰️ 💻

Eduardo San Martin Morote posva

〰️( ͡~ ͜ʖ ͡°)〰️ 💻
View GitHub Profile
posva / config.yml
Last active May 2, 2020
Simple Circle CI 2 config for node/js projects
View config.yml
# Javascript Node 8 simple CircleCI 2.0 configuration file
# Eduardo San Martin Morote
# Check for more details
# Put this file in a .circleci/ folder
version: 2

Keybase proof

I hereby claim:

  • I am posva on github.
  • I am posva ( on keybase.
  • I have a public key whose fingerprint is F92A 0A3D 8D7F 3C01 AEBD E539 59AF 6DFC 8A56 282D

To claim this, I am signing this object:

View Nightwatch

Install the needed packages

npm i --save-dev nightwatch selenium-server chromedriver

Create a e2e-tests dir:

mkdir e2e-tests
posva /
Created Oct 17, 2014
Install tmux without root rights. Fixed from
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
posva /
Created Sep 2, 2014
Generates a dirtree (LaTex) view with line count
#! /bin/bash
L=$(echo index_a6_se_ast.html index_a6_se_tst.html js_a6_se_ast/*.js js_a6_se_tst/*.js js/lib/qtBinding.js js/lib/nuntius.js js_a6_se_tst/css/main.css json/ json/ json/ json/a6JSONValidator.js)
N=$(cat $L | wc -l)
echo "Total $N"
for i in $L; do
T=$(wc -l $i)
lines=$(echo "$T" | cut -d " " -f1)
posva /
Created Aug 22, 2014
Watch for files changes
#! /bin/sh
WHEN=$(stat -c "%Y" report.tex)
while true; do
NOW=$(stat -c "%Y" report.tex)
if [ "$NOW" -gt "$WHEN" ]; then
sleep 1
posva / fancy-header.vim
Created Aug 17, 2014
Use Ctr+H to add the classic header with defines guards for C/C++ files
View fancy-header.vim
" fill rest of line with characters
function! FillLine( str, l )
" strip trailing spaces first
" calculate total number of 'str's to insert
let reps = (a:l - col("$")) / len(a:str)
" insert them, if there's room, removing
" trailing spaces (though forcing
" there to be one)
if reps > 0
posva / diff.js
Created Aug 14, 2014
Advanced diff between arrays
View diff.js
var diff = function(a, b) {
var c = [], dels = [], delsIndex = [];
var i = 0, j = 0, k,
x, y, z;
var t = 0; //debug
while (i < a.length || j < b.length) {
x = a[i];
y = b[j];
posva / tmux.conf
Created Jul 28, 2014
Some conf I need to edit
View tmux.conf
set-window-option -g utf8 on
set-window-option -g mode-keys vi
set -s escape-time 0
setw -g window-status-current-attr underscore
set-option -g default-terminal "screen-256color"
set-option -g status-interval 5
set -g pane-active-border-fg white
View vv
#! /bin/bash
# Open multiple files in vim
# Every hpp, cpp couple is opened in a separted tab
# by Eduardo San Martin Morote aka Posva
function _set_T() {