Skip to content

Instantly share code, notes, and snippets.

View matusnovak's full-sized avatar

Matus Novak matusnovak

View GitHub Profile
@m1k1o
m1k1o / nvidia-docker.md
Last active March 29, 2021 19:41
Install Nvidia for Docker on Ubuntu

Install Nvidia CUDA and use it in Docker

1. Download

Should be something like this:

wget https://developer.download.nvidia.com/compute/cuda/11.2.2/local_installers/cuda_11.2.2_460.32.03_linux.runsudo
sh cuda_11.2.2_460.32.03_linux.run
@zwcloud
zwcloud / Dog.cs
Created November 21, 2016 08:38
An example on embedding Mono runtime in C/C++.
using System;
public class Dog
{
static public void Type()
{
Console.WriteLine("a Dog!");
}
public void Bark()
{
@abingham
abingham / capture_help.py
Last active May 22, 2023 20:55
How to capture the output of Python's help() function.
import io
import sys
# Temporarily redirect stdout to a StringIO.
stdout = sys.stdout
s = io.StringIO()
sys.stdout = s
help(sys.intern)
@StephanHoyer
StephanHoyer / github.js
Last active February 13, 2024 14:19
Commiting multiple files to github over API
'use strict';
var Octokat = require('octokat');
var extend = require('lodash/object/assign');
var defaults = {
branchName: 'master',
token: '',
username: '',
reponame: ''
@gjtorikian
gjtorikian / remove_file.rb
Last active March 20, 2023 03:21
How to remove a file from a subdirectory using the GitHub API v3
#!/usr/bin/env ruby
require 'octokit'
# !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!!
login = ENV['GH_LOGIN']
password = ENV['GH_LOGIN_PASSWORD']
repo = "gjtorikian/crud-test"
master = client.ref(repo, "heads/master")