View djc.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdlib> | |
#include <vector> | |
#include <boost/graph/adjacency_matrix.hpp> | |
#include <boost/graph/graph_utility.hpp> | |
#include <boost/graph/undirected_dfs.hpp> | |
#include <boost/graph/connected_components.hpp> | |
// this class can be used to randomly decide if two | |
// RandomMatcher objects match or not | |
template<unsigned N> |
View post_install.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$#" -ne 2 ]; then | |
echo "Usage: $0 <hostname> <email>" | |
exit 1 | |
fi | |
echo "Post install process for Fedora Core 27" | |
# TODO: verify corret version and verify run-once |
View Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# making all .cpp files in the directory | |
# each one into its own target | |
CXX ?= g++ | |
CXXFLAGS ?= -Wall -std=c++11 | |
.PHONY: all clean | |
SRCS = $(wildcard *.cpp) |
View tmux.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# remap prefix from 'C-b' to 'C-a' | |
unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix | |
# split panes using | and - | |
bind | split-window -h | |
bind - split-window -v | |
unbind '"' | |
unbind % |
View nuke-minikube.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://kubernetes.io/docs/getting-started-guides/minikube/ | |
# stop and delete | |
minikube stop | |
minikube delete | |
# remove local cache | |
rm -rf ~/.kube ~/.minikube |
View openshift-inventory.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create an OSEv3 group that contains the masters and nodes groups | |
[OSEv3:children] | |
masters | |
nodes | |
# Set variables common for all OSEv3 hosts | |
[OSEv3:vars] | |
# SSH user, this user should allow ssh based auth without requiring a password | |
ansible_ssh_user=root | |
View override.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ackage main | |
import "fmt" | |
// assume this is the original implementation of the callback: | |
/* | |
// by default the callback say hello only to jane | |
PrintCallback(name string) bool { | |
if name == "jane" { | |
return true | |
} |
View install-k8s.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install k8s on a single node (centos7.4): | |
# this is mostly based on: https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/ | |
# to run from outside the node: | |
# scp install-k8s.sh root@<node>:~ && ssh root@<node> "bash ./install-k8s.sh" | |
# install and enable docker | |
yum install -y docker | |
systemctl enable docker && systemctl start docker |
View create-centos-vm.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$#" -ne 2 ]; then | |
echo "Usage: $0 <hostname> <cluster-name>" | |
exit 1 | |
fi | |
NAME=$1 | |
CLUSTER=$2 | |
HOST=$1.$2 |
View matlab-to-cpp.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# fix comments | |
sed -i 's/%/\/\//g' $1 | |
# fix "end" | |
sed -i 's/end/}/g' $1 | |
# fix "3 dots" | |
sed -i 's/\.\.\.//g' $1 | |
# fix "elseif" |
OlderNewer