Skip to content

Instantly share code, notes, and snippets.

View eduardoaugustojulio's full-sized avatar
🏗️
building

Eduardo Augusto eduardoaugustojulio

🏗️
building
View GitHub Profile
@sansumbrella
sansumbrella / EventDispatcher.cpp
Created August 3, 2009 07:02
C++ observer pattern for event handling.
#include "EventDispatcher.h"
void EventDispatcher::addListener( Listener *l )
{
mListeners.push_back(l);
}
void EventDispatcher::removeListener( Listener *l )
{
mListeners.erase( std::remove( mListeners.begin(), mListeners.end(), l ), mListeners.end() );
@joaopizani
joaopizani / .screenrc
Created May 17, 2012 11:55
A killer GNU Screen Config
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# huge scrollback buffer
defscrollback 5000
# no welcome message
startup_message off
@lhotari
lhotari / add_modes_to_screen.sh
Created May 24, 2013 13:16
script for adding standard modes to beamer for presenting on linux
#!/bin/bash
# script for adding standard modes to beamer for presenting on linux
# use xrandr to find out screen name of external output port
# xrandr is in x11-xserver-utils package on debian/ubuntu
SCREENNAME=$1
if [ -z "$SCREENNAME" ]; then
SCREENNAME=VGA-0
fi
function addmode() {
xrandr --newmode `cvt $1 $2 |grep Modeline | sed -e 's/^Modeline //' | sed -e 's/\"//g'`
@chetanppatil
chetanppatil / install-sonar-scanner.sh
Last active December 28, 2023 04:31
Install sonar-scanner in linux mint, ubuntu...
#!/bin/bash
cd /tmp || exit
echo "Downloading sonar-scanner....."
if [ -d "/tmp/sonar-scanner-cli-4.7.0.2747-linux.zip" ];then
sudo rm /tmp/sonar-scanner-cli-4.7.0.2747-linux.zip
fi
wget -q https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.7.0.2747-linux.zip
echo "Download completed."