Skip to content

Instantly share code, notes, and snippets.

View dgacitua's full-sized avatar

Daniel Gacitúa dgacitua

View GitHub Profile
@qcho
qcho / aliases\Logitech_G923_TRUEFORCE_Racing_Wheel_PS_USB.xml
Created August 1, 2021 03:00
City Car Driving Preset - Logitech G923 TRUEFORCE Racing Wheel PS
<?xml version="1.0"?>
<Alias targetDevice1="Logitech G923 TRUEFORCE Racing Wheel PS USB"
targetDevice2="Logitech G923 TRUEFORCE Racing Wheel PS"
targetProductGuid="{C266046D-0000-0000-0000-504944564944}">
<Axis axis="x" name="Steering" />
<Axis axis="y" name="Gas" />
<Axis axis="rz" name="Brake" />
<Axis axis="slider:0" name="Clutch" />
<Button number="1" name="X" />
<Button number="2" name="Square" />
@ckandoth
ckandoth / single_machine_slurm_on_ubuntu.md
Last active December 13, 2023 20:12
Install Slurm 19.05 on a standalone machine running Ubuntu 20.04

Use apt to install the necessary packages:

sudo apt install -y slurm-wlm slurm-wlm-doc

Load file:///usr/share/doc/slurm-wlm/html/configurator.html in a browser (or file://wsl%24/Ubuntu/usr/share/doc/slurm-wlm/html/configurator.html on WSL2), and:

  1. Set your machine's hostname in SlurmctldHost and NodeName.
  2. Set CPUs as appropriate, and optionally Sockets, CoresPerSocket, and ThreadsPerCore. Use command lscpu to find what you have.
  3. Set RealMemory to the number of megabytes you want to allocate to Slurm jobs,
  4. Set StateSaveLocation to /var/spool/slurm-llnl.
  5. Set ProctrackType to linuxproc because processes are less likely to escape Slurm control on a single machine config.
@csgillespie
csgillespie / graphics.R
Last active November 12, 2022 14:31
Exploring R graphics
# Used in the blog post
# https://www.jumpingrivers.com/blog/r-graphics-cairo-png-pdf-saving/
library(ggplot2)
library(extrafont)
library(ragg)
library(Cairo)
extrafont::loadfonts()
set.seed(1)
@abdallahokasha
abdallahokasha / Install_robo3t_Ubuntu.md
Last active September 24, 2023 14:54
Install Robo3t on Ubuntu18.04 and make a desktop icon for it

Install Robo3t On Ubuntu 18.04

Download the package form Robo3t or using wget
wget https://download.robomongo.org/1.2.1/linux/robo3t-1.2.1-linux-x86_64-3e50a65.tar.gz
Extract here using

tar -xvzf robo3t-1.2.1-linux-x86_64-3e50a65.tar.gz

@stuartaccent
stuartaccent / file-uploader.component.html
Last active March 18, 2021 16:24
Angular 7 file uploader with queue and progress using HttpClient, example https://stackblitz.com/edit/angular-7-file-upload-queue
<div class="row">
<div class="col-md-3">
<h3>Select files</h3>
<input type="file" #fileInput multiple (change)="addToQueue()" />
</div>
<div class="col-md-9">
<h3>Upload queue</h3>
<table class="table-headed table-striped">
@chranderson
chranderson / nvmCommands.js
Last active May 6, 2024 10:00
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@stefanbuck
stefanbuck / upload-github-release-asset.sh
Last active November 26, 2023 12:40
Script to upload a release asset using the GitHub API v3.
#!/usr/bin/env bash
#
# Author: Stefan Buck
# License: MIT
# https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447
#
#
# This script accepts the following parameters:
#
# * owner
@umidjons
umidjons / connect-remote-mongo-via-ssh-tunnel.md
Last active December 12, 2022 07:24
Create ssh tunnel and connect to the remote mongo database on command line

Create ssh tunnel and connect to the remote mongo database on command line

Assume followings:

/mykeys/.ssh/prodserver.pem - is a certificate file

umid - is a user name

111.111.111.111 - is a remote host, that mongodb runs

@remarkablemark
remarkablemark / Dockerfile
Last active April 24, 2024 13:40
Install node and npm with nvm using Docker.
# set the base image to Debian
# https://hub.docker.com/_/debian/
FROM debian:latest
# replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# update the repository sources list
# and install dependencies
RUN apt-get update \
@primaryobjects
primaryobjects / nnet.R
Created March 28, 2016 19:53
Neural network (nnet) with caret and R. Machine learning classification example, includes parallel processing.
library(caret)
library(doParallel)
registerDoParallel(cores = 2)
# Read data.
data <- read.csv('train.csv')
test <- read.csv('test.csv')
# Set classification column to factor.