Skip to content

Instantly share code, notes, and snippets.

View lyashevska's full-sized avatar

Olga Lyashevska lyashevska

View GitHub Profile
#!/bin/bash
apptainer exec netlogo-headless.sif netlogo-headless.sh --model "/app/netlogo/models/IABM Textbook/chapter 4/Wolf Sheep Simple 5.nlogo" --experiment "Wolf Sheep Simple model analysis" --table wolf_sheep_output.csv
#!/bin/bash
sbatch --time=0-02:00:00 job.sh
#!/bin/bash
sudo apptainer build netlogo-headless.sif netlogo-headless.def
"""
Purpose: this script creates GitHub gists for all files in a directory.
Adapted from
https://jels-boulangier.medium.com/automatically-create-github-gists-for-your-medium-articles-ba689775b032
Usage: python create_gists.py <directory>
"""
import subprocess
import sys
from pathlib import Path
Bootstrap: docker
From: openjdk:17
%arguments
NETLOGO_VERSION=6.3.0
%setup
# Download Netlogo on host if not already present
wget -nc https://ccl.northwestern.edu/netlogo/{{NETLOGO_VERSION}}/NetLogo-{{NETLOGO_VERSION}}-64.tgz
@lyashevska
lyashevska / README-Template.md
Created November 11, 2019 12:35 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@lyashevska
lyashevska / add-new-local-user.sh
Created September 25, 2018 15:24
add-new-local-user
#!/bin/bash
# Make sure the script is being executed with superuser privileges.
if [[ "${EUID}" -ne 0 ]]; then
echo 'The script requires root priveledges'
exit 1
fi
# supply at least one argument otherwise return an exit status of 1
if [[ "${#}" -lt 1 ]]
@lyashevska
lyashevska / add-local-user.sh
Created August 24, 2018 11:32
add local user
#! /bin/bash
# this script will create new user accounts
# enforce execution with a root priviledges,
# return status 1 if not root
if [[ "${UID}" -eq 0 ]]
then
# enter the username (login),
@lyashevska
lyashevska / gist:ba4cbad68f4b5238c33885c958654747
Created July 23, 2018 12:14
vagrant: destination host unreachable
ping -c 3 10.9.8.7
PING 10.9.8.7 (10.9.8.7) 56(84) bytes of data.
From 10.9.8.1 icmp_seq=1 Destination Host Unreachable
From 10.9.8.1 icmp_seq=2 Destination Host Unreachable
From 10.9.8.1 icmp_seq=3 Destination Host Unreachable
--- 10.9.8.7 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2048ms
pipe 3
@lyashevska
lyashevska / eps2png.sh
Created November 9, 2017 11:39
batch conversion of eps to png in bash
for f in `ls *.eps`; do
convert -density 100 $f -flatten ${f%.*}.png;
done