Skip to content

Instantly share code, notes, and snippets.

@cenit
cenit / LabView_GIT_setup.md
Last active December 7, 2018 10:55
Git diff config for LabVIEW

The following repo seems already fully well documented for the process (note that the actual code is not in the master branch, but the instructions actually work since they point to that specific branch directly at clone event): GitHub repo

Another interesting post full of informations is here: Lavag forum

@cenit
cenit / latlon_nominatim.py
Last active September 11, 2018 09:53
lat/lon from docx to nominatim
#! /usr/bin/env python2
# -*- coding: utf-8 -*-
#in case of any problem on macOS, remember to export PYTHONIOENCODING=utf-8
# first extract document.xml unzipping the docx
file = 'document.xml'
with open(file) as f:
contents = f.readlines()
#put it in /etc/wsl.conf
[automount]
enabled = true
root = /mnt/
options = "metadata,umask=22,fmask=11,case=off"
mountFsTab = false
[network]
generateHosts = true
@cenit
cenit / equivalence.f90
Created November 20, 2017 11:32
equivalence tests for Fortran
program equivalence
implicit none
integer, parameter :: sp = selected_real_kind(6, 37)
integer, parameter :: dp = selected_real_kind(15, 307)
integer, parameter :: dp_int = selected_int_kind(16)
integer, parameter :: hp_int = selected_int_kind(4)
integer, parameter :: qp = selected_real_kind(33, 4931)
@cenit
cenit / vcpkg_with_VS_projects.md
Created November 11, 2017 11:13
small tutorial on how to add proper tags to vcxproj files to enable vcpkg

While vcpkg works without any problem and any modification for the default triplet (x86-windows), if you need to use vcpkg libraries in your project targeting different triplets a small manual tag addition is required.

Open the project' .vcxproj file and find this section:

  <PropertyGroup Label="Globals">
        ....
  </PropertyGroup>

Keybase proof

I hereby claim:

  • I am cenit on github.
  • I am cenit (https://keybase.io/cenit) on keybase.
  • I have a public key ASDPyxw-L0Pk4oiChbYq6RWw5gGHo8hD-24daEROHBJsMAo

To claim this, I am signing this object:

@cenit
cenit / Git push deployment in 7 easy steps.md
Last active April 26, 2017 07:55 — forked from thomasfr/Git push deployment in 7 easy steps.md
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook

How-to setup a simple git push deployment

On the server (example.com)

  1. Create a user on example.com, as which we (the git client) connect (push) to exmaple.com. We set git-shell as the login shell, so it is not possible to interactively login as this user.
sudo useradd -m -s /usr/bin/git-shell git
#!/bin/bash
NUMERO_TOTALE_CORE_DA_USARE=56
NUMERO_TOTALE_SCHEDE_VIDEO_DA_USARE=1
SYM_TYPE="CPU"
GPU_TYPE="k40"
BLENDER_FILE=benchmark.blend
IMAGE_TYPE=PNG
START_FRAME=2467
#include <stdio.h>
#include <math.h>
int main() {
float i;
for (i=0; i < M_PI; i+=0.1) printf ("sin(%f) = %f\n", i, sin(i));
return 0;
}
@cenit
cenit / run_cnaf_serial.sh
Last active August 29, 2015 14:18
script to run serial @ CNAF
#!/bin/bash
PATH_ESEGUIBILE="./ALaDyn"
stderr_file=stderr.txt
stdout_file=stdout.txt
job=job_serial.cmd
job_name=S01
queue=hpc_test
use_whole_node=true