Skip to content

Instantly share code, notes, and snippets.

@kprussing
kprussing / CMakeLists.txt
Last active October 11, 2022 23:13
Packaging executable, shared library, and Python bindings
cmake_minimum_required(VERSION 3.14)
project(mwe LANGUAGES C CXX)
# Define the primary library and executable and install in the usual way
add_library(mwe SHARED library.cpp)
target_include_directories(mwe
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)
@tmckayus
tmckayus / remote_crc.md
Last active September 23, 2025 23:04
Running 'crc' on a remote server

Overview: running crc on a remote server

This document shows how to deploy an OpenShift instance on a server using CodeReady Containers (crc) that can be accessed remotely from one or more client machines (sometimes called a "headless" instance). This provides a low-cost test and development platform that can be shared by developers. Deploying this way also allows a user to create an instance that uses more cpu and memory resources than may be available on his or her laptop.

While there are benefits to this type of deployment, please note that the primary use case for crc is to deploy a local OpenShift instance on a workstation or laptop and access it directly from the same machine. The headless setup is configured completely outside of crc itself, and supporting a headless setup is beyond the mission of the crc development team. Please do not ask for changes to crc to support this type of deployment, it will only cost the team time as they politely decline :)

The instructions here were tested with F

@ageis
ageis / YubiKey-GPG-SSH-guide.md
Last active June 25, 2025 15:14
Technical guide for using YubiKey series 4 for GPG and SSH

YubiKey 4 series GPG and SSH setup guide

Written for fairly adept technical users, preferably of Debian GNU/Linux, not for absolute beginners.

You'll probably be working with a single smartcard, so you'll want only one primary key (1. Sign & Certify) and two associated subkeys (2. Encrypt, 3. Authenticate). I've published a Bash function which automates this slightly special key generation process.

@FelixZhang
FelixZhang / osc-cheatsheet.md
Last active August 7, 2024 07:39
osc cheatsheet

osc cheatsheet

configuration

.oscrc

TBD

aliases

@jniltinho
jniltinho / install-spark-opensuse.sh
Last active August 11, 2020 16:06
Install Spark OpenSUSE
#!/bin/bash
### Install Spark + JRE8 on OpenSUSE 64Bits
### https://gist.github.com/domderen/27caeb7eb02118d71279
### https://www.tutorialspoint.com/apache_spark/apache_spark_installation.htm
zypper in -y python-numpy python-scipy python-matplotlib python-sympy python-nose
echo '# disable ipv6
net.ipv6.conf.all.disable_ipv6 = 1
@mpneuried
mpneuried / Makefile
Last active August 29, 2025 08:17
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@evenv
evenv / Spark Dataframe Cheat Sheet.py
Last active August 3, 2025 19:50
Cheat sheet for Spark Dataframes (using Python)
# A simple cheat sheet of Spark Dataframe syntax
# Current for Spark 1.6.1
# import statements
from pyspark.sql import SQLContext
from pyspark.sql.types import *
from pyspark.sql.functions import *
#creating dataframes
df = sqlContext.createDataFrame([(1, 4), (2, 5), (3, 6)], ["A", "B"]) # from manual data