Skip to content

Instantly share code, notes, and snippets.

View fmount's full-sized avatar

Francesco Pantano fmount

View GitHub Profile
@fmount
fmount / gist:1bff0871e1982a87def2914a4c30b756
Created August 3, 2017 10:13
taskwarrior-tmux-latyout
# Load default .tmux.conf
source-file ~/.tmux.conf
split-window -v -p 45 -c ~/
select-pane -t 0
#send-keys 'ls -lart' Enter
split-window -h -p 50 -c ~/
select-pane -t 1
split-window -v -p 50 -c ~/
@fmount
fmount / expose_crc_dev.md
Last active May 2, 2022 09:07
A few notes to setup a development environment based on Code Ready Containers platform

Expose CodeReady container Platform on CentOS

Sizing

  • 4 physical CPU cores
  • 8 GB of free memory
  • 35 GB of storage space

Update and install some required packages

@fmount
fmount / tempest.conf.sample
Created March 11, 2022 08:30
Tempest conf sample
[network]
default_network = 10.0.0.0/22
public_router_id =
public_network_id =
project_networks_reachable = false
project_network_cidr = 10.0.0.0/22
[DEFAULT]
debug = True
log_file = tempest.log
@fmount
fmount / local.conf
Created March 8, 2022 10:15
devstack local.conf
[[local|localrc]]
ADMIN_PASSWORD=secret
DATABASE_PASSWORD=secret
RABBIT_PASSWORD=secret
SERVICE_PASSWORD=secret
##########
# MANILA #
##########
@fmount
fmount / standalone.sh
Last active January 26, 2022 12:45
Deploy a standalone OpenStack via TripleO
export IP=192.168.24.2
export NETMASK=24
export INTERFACE=eth1
function gen_cont {
openstack tripleo container image prepare default \
--output-env-file "$HOME"/containers-prepare-parameters.yaml
}
function gen_config {
diff --git a/assets/controller.yaml b/assets/controller.yaml
index 4177f05..2733cb1 100644
--- a/assets/controller.yaml
+++ b/assets/controller.yaml
@@ -2,7 +2,7 @@ kind: Deployment
apiVersion: apps/v1
metadata:
name: openstack-manila-csi-controllerplugin
- namespace: openshift-manila-csi-driver
+ namespace: manila-csi-driver
#include <stdio.h>
#include <unistd.h>
int enter_chroot(const char * root) {
/* chroot */
chdir(root);
if (chroot(root) != 0) {
perror("chroot");
return 1;
}

Keybase proof

I hereby claim:

  • I am fmount on github.
  • I am fmount (https://keybase.io/fmount) on keybase.
  • I have a public key ASAwiWq2Rq3QNUjLJP_d4Hn10KJfMBxLzOpPmSRdUnJDGgo

To claim this, I am signing this object:

@fmount
fmount / fcntl_lock.c
Created October 24, 2017 08:04
Try to acquire lock on a given resource (file) on fs using the flock
#include<stdlib.h>
#include<unistd.h>
#include<errno.h>
#include<fcntl.h>
int main(int argc, char **argv)
{
int fd;
struct flock fl;