Skip to content

Instantly share code, notes, and snippets.

View polhaghverdian's full-sized avatar

Pol Haghverdian polhaghverdian

View GitHub Profile
---
- hosts: localhost
connection: local
name: IMPORTING SECURITY KEYS
vars:
my_key_list:
- https://rpmfusion.org/keys?action=AttachFile&do=get&target=RPM-GPG-KEY-rpmfusion-free-fedora-2020
- https://rpmfusion.org/keys?action=AttachFile&do=get&target=RPM-GPG-KEY-rpmfusion-nonfree-fedora-2020
@anirban94chakraborty
anirban94chakraborty / tensorflow-gpu-in-jupyter-lab.md
Last active February 12, 2024 16:38
Install Tensorflow-GPU (for NVIDIA GPUs) for use in JupyterLab using Anaconda

Install Tensorflow-GPU (for NVIDIA GPUs) for use in JupyterLab using Anaconda

This tutorial is for computers with NVIDIA GPUs installed.

Tensorflow for GPU significantly reduces the time taken by Deep Neural Networks (like CNNs, LSTMs, etc) to complete each Epoch (compute cycle) by utilizing the CUDA cores present in the GPU for parallel processing.

The following steps are to be followed:

  1. Make sure that you have installed the latest drivers of your NVIDIA GPU for your OS.
@dontlaugh
dontlaugh / iptables.md
Last active January 1, 2023 01:40
Setting up a libvirt virtual machine lab
                             +-------------------------------------+
                             | `iptables -L`  below                |
                             |                                     |
                             |             +--------+ +--------+   |
                             |             |        | |        |   |
+-----------------+          |             |        | |vnet0   |   |
|                 |          |             |        | |        |   |
| Laptop          |   ???    |             |        | +--------+   |
@berkorbay
berkorbay / github_desktop_ubuntu.md
Last active April 30, 2024 14:54
To install Github Desktop for Ubuntu

IMPORTANT

See the following links for further updates to Github Desktop for Ubuntu. These are official instructions. (also mentioned by fetwar on Nov 3, 2023)

For the sake of "maintaining the tradition" here is the updated version.

@RagedUnicorn
RagedUnicorn / cloud_init_debugging.md
Last active May 2, 2024 14:38
Debugging tipps when working with cloud-init

Cloud-Init Debugging

Cloud-init combined with terraform can be a powerful tool to provision instances on startup. Debugging scripts that are run by cloud-init however are not the easiest to debug.

Logs

Usually on an Ubuntu machine a lot of what is happening can be found in the syslog

cat /var/log/syslog
@farinspace
farinspace / x11vnc.md
Last active November 6, 2021 20:53
x11vnc setup solution, Ubuntu 18.04 LTS

Make and Make install

See x11vnc stack smashing detected solution

Recommended version: x11vnc: 0.9.14 lastmod: 2013-11-21

.Xauthority

Set desktop to auto login and prevent screen locking .. else you will need to deal with Xauth

@yohhoy
yohhoy / ff2cv.cpp
Last active April 12, 2024 06:49
Read video frame with FFmpeg and convert to OpenCV image
/*
* Read video frame with FFmpeg and convert to OpenCV image
*
* Copyright (c) 2016 yohhoy
*/
#include <iostream>
#include <vector>
// FFmpeg
extern "C" {
#include <libavformat/avformat.h>
@wpscholar
wpscholar / vagrant-cheat-sheet.md
Last active April 25, 2024 12:11
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
@germanviscuso
germanviscuso / rpi_boot_fix
Last active November 25, 2023 18:44
Fix for RPi: "Volume was not properly unmounted. Some data may be corrupt. Please run fsck."
# dmesg | grep corrupt
[ 21.280705] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
# umount /boot
# git clone http://daniel-baumann.ch/git/software/dosfstools.git
# cd dosfstools
# make
cc -O2 -fomit-frame-pointer -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wextra -Wno-sign-compare -Wno-missing-field-initializers -Wmissing-prototypes -Wstrict-prototypes -g -c -o fatlabel.o src/fatlabel.c
.
@chirag64
chirag64 / xrandr.sh
Last active April 29, 2024 12:57 — forked from debloper/xrandr.sh
Added license on user request
#!/bin/bash
# Copyright © 2021 Chirag Bhatia
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOF