Skip to content

Instantly share code, notes, and snippets.

@rohitfarmer
rohitfarmer / build-singularity.md
Last active December 13, 2023 17:24
Instructions to build a singularity container with popular data science and chemistry packages, including Tensorflow.

Building a Singularity Container for Machine Learning, Data Science, & Chemistry

Learning Objectives

  1. Build a Linux based Singularity container.
    • First build a writable sandbox with essential elements.
    • Inspect the container.
    • Install additional software.
    • Convert the sandbox to a read-only SquashFS container image.
  2. Install software & packages from multiple sources.
  • Using apt-get package management system.
import requests
import h5py
import yt
print(yt.__version__)
# First download a test halo from the TNG project
baseUrl = 'http://www.tng-project.org/api/'
def get(path, params=None):
# Let networkd manage all devices on this system
network:
version: 2
renderer: networkd
ethernets:
#declare the interface used y the bridge device
enp7s0:
dhcp4: no
dhcp6: no
@udkyo
udkyo / Dockerfile
Last active March 7, 2024 21:22
Basic container for X11 forwarding goodness
FROM ubuntu
RUN apt update \
&& apt install -y firefox \
openssh-server \
xauth \
&& mkdir /var/run/sshd \
&& mkdir /root/.ssh \
&& chmod 700 /root/.ssh \
&& ssh-keygen -A \
&& sed -i "s/^.*PasswordAuthentication.*$/PasswordAuthentication no/" /etc/ssh/sshd_config \
@extremecoders-re
extremecoders-re / qemu-networking.md
Last active March 31, 2024 17:19
Setting up Qemu with a tap interface

Setting up Qemu with a tap interface

There are two parts to networking within QEMU:

  • The virtual network device that is provided to the guest (e.g. a PCI network card).
  • The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).

Example: User mode network

@derick-montague
derick-montague / sync-github-to-bitbucket.md
Last active March 11, 2024 09:36
Sync github repo to bitbucket repo

Set up remotes

setup local repo

mkdir myrepository
cd myrepository
git init

add bitbucket remote as "origin"

@zshaheen
zshaheen / installing-and-running-slurm.md
Last active January 24, 2019 01:38
Installing and running Slurm on greyworm and other clusters

Installing and running Slurm on greyworm and other clusters

This page will specifically detail how to install and run Slurm on the greyworm cluster at LLNL. These instructions can be adapted to work on other clusters with other nodes.

In the current configuration, aims4.llnl.gov is the head, while greyworm[1-8].llnl.gov are the compute nodes. Note: The steps here are for the current configuration of aims4 and greyworm[1-8]. The configuration might change in the future.

A Brief Intro to Slurm

Slurm is a job scheduler used to run jobs on supercomputers and clusters.

@lgarrison
lgarrison / high_performance_python.ipynb
Last active July 23, 2020 14:10
High-Performance Python, or When to Write For Loops in Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cfebs
cfebs / vboxhostonlyssh.md
Last active October 22, 2023 12:32
setup a vbox ubuntu server with host only adapter

Virtualbox dev environment w/ static IP

I can never find a great guide on this stuff, so these are more like notes to myself.

The goal here is to have a virtualbox running more or less headless. An ssh client is used separately to actually use the machine. I've found it to be fantastic for a quick dev setup.

lets go

Assumes you have a vbox setup with Ubuntu server (this will work for 16.04) ready to go.

@mangoliou
mangoliou / x11vnc-stack-smashing-detected-solution.mk
Last active June 1, 2023 06:49
x11vnc `stack smashing detected` solution.
# Install x-related to compile x11vnc from source code.
sudo apt-get update
sudo apt-get install -y libxtst-dev libssl-dev libjpeg-dev
# Grep source code.
wget http://x11vnc.sourceforge.net/dev/x11vnc-0.9.14-dev.tar.gz
gzip -dc x11vnc-0.9.14-dev.tar.gz | tar -xvf -
cd x11vnc-0.9.14/
./configure --prefix=/usr/local CFLAGS='-g -O2 -fno-stack-protector -Wall'