Skip to content

Instantly share code, notes, and snippets.

@cenit
cenit / LabView_GIT_setup.md
Last active Dec 7, 2018
Git diff config for LabVIEW
View LabView_GIT_setup.md

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 Sep 11, 2018
lat/lon from docx to nominatim
View latlon_nominatim.py
#! /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()
View wsl.conf
#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 Nov 20, 2017
equivalence tests for Fortran
View equivalence.f90
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 Nov 11, 2017
small tutorial on how to add proper tags to vcxproj files to enable vcpkg
View vcpkg_with_VS_projects.md

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>
View keybase.md

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 Apr 26, 2017 — 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
View Git push deployment in 7 easy steps.md

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
View run_cnaf_blender.sh
#!/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
View test_trig.c
#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 Aug 29, 2015
script to run serial @ CNAF
View run_cnaf_serial.sh
#!/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
You can’t perform that action at this time.