Skip to content

Instantly share code, notes, and snippets.

@happyincent
happyincent / teamviewer.md
Last active February 1, 2024 20:22
Install TeamViewer without a connected monitor (Xubuntu 16.04 & 18.04)

Install

wget https://download.teamviewer.com/download/linux/teamviewer_amd64.deb
sudo apt update -y
sudo apt install gdebi -y
sudo gdebi teamviewer_amd64.deb

sudo teamviewer passwd PASSWORD_TO_BE_CHANGED
sudo teamviewer daemon enable
teamviewer info
@vratiu
vratiu / .bash_aliases
Last active March 25, 2024 14:24
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
@andrewrk
andrewrk / gist:1883543
Created February 22, 2012 09:20
function to count trailing zeros

Given an unsigned integer, return the number of trailing zero bits

Test framework:

#include <stdio.h>
#include <assert.h>

unsigned trailing_zeros(unsigned n) {
    // fill in this function