Skip to content

Instantly share code, notes, and snippets.

View luca-penasa's full-sized avatar

Luca Penasa luca-penasa

View GitHub Profile

Usage

curl -sSL https://gist.github.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/autossh@host1 | \
  sudo tee /etc/default/autossh@example
curl -sSL https://gist.github.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/[email protected] | \
  sudo tee /etc/systemd/system/[email protected]

sudo useradd -g nogroup -s /bin/false -m tunnel
sudo -u tunnel mkdir -p ~tunnel/.ssh # and copy your private key here
@luca-penasa
luca-penasa / test_attrs.py
Last active October 26, 2018 17:27
variables_proof_concept
from enum import Enum
import attr
class VarType(Enum):
VAR = "var"
REF = "ref"
from copy import copy
def ref_to_ref_obj_attr_name(varname):
@luca-penasa
luca-penasa / Gmail password reset
Created August 9, 2017 14:59 — forked from bjarki/Gmail password reset
Reset gmail password 100 times
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Versions
'
' Version: 1.5
' source: inzi.com
'
' Change Log
'
' v1.0
' Original

Fist time compile CloudCompare on centos 7

first install development tools, you can do a group install

if you dont know which group to install have a look at the list of existing groups:

yum group list
@luca-penasa
luca-penasa / make_vtk_camera.cpp
Created February 14, 2017 16:33 — forked from decrispell/make_vtk_camera.cpp
Convert standard camera intrinsic (focal length, principal point) and extrinsic parameters (rotation and translation) into a vtkCamera for rendering. Assume square pixels and 0 skew for now.
/**
* Convert standard camera intrinsic and extrinsic parameters to a vtkCamera instance for rendering
* Assume square pixels and 0 skew (for now).
*
* focal_len : camera focal length (units pixels)
* nx,ny : image dimensions in pixels
* principal_pt: camera principal point,
* i.e. the intersection of the principal ray with the image plane (units pixels)
* camera_rot, camera_trans : rotation, translation matrix mapping world points to camera coordinates
* depth_min, depth_max : needed to set the clipping range
make[1]: Entering directory '/run/media/luca/data/mxe.git'
uname -a
Linux luther 4.4.24-1-MANJARO #1 SMP PREEMPT Sat Oct 8 07:49:12 UTC 2016 x86_64 GNU/Linux
git log --pretty=tformat:"%H - %s [%ar] [%d]" -1
6164a71b971c7b9b301a65347b47bc21709003a6 - Update versions.json & build-matrix.html [2 days ago] [ (HEAD -> master, origin/master, origin/HEAD)]
lsb_release -a 2>/dev/null || sw_vers 2>/dev/null || true
LSB Version: n/a
Distributor ID: ManjaroLinux
Description: Manjaro Linux
Release: 16.08
@luca-penasa
luca-penasa / CMakeOutput.log
Created October 11, 2016 09:39
vtk 6 compile log
The system is: Linux - 4.4.24-1-MANJARO - x86_64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /usr/bin/cc
Build flags:
Id flags:
The output was:
0