Skip to content

Instantly share code, notes, and snippets.

#include <ros/package.h>
#include <ros/ros.h>
#include <sensor_msgs/CameraInfo.h>
#include <sensor_msgs/Image.h>
#include <sensor_msgs/PointCloud.h>
#include <atomic>
#include <mutex>
#include <string>
@cassinaj
cassinaj / Qt 5 Dark Fusion Palette
Created February 21, 2017 20:16 — forked from QuantumCD/Qt 5 Dark Fusion Palette
This is a complete (I think) dark color palette for the Qt 5 Fusion theme, as well as a nice style sheet for the tool tips that make them blend better with the rest of the theme. To have immediate effect, be sure to put this in your main function before showing the parent window. Child windows should automatically inherit the palette unless you …
qApp->setStyle(QStyleFactory::create("Fusion"));
QPalette darkPalette;
darkPalette.setColor(QPalette::Window, QColor(53,53,53));
darkPalette.setColor(QPalette::WindowText, Qt::white);
darkPalette.setColor(QPalette::Base, QColor(25,25,25));
darkPalette.setColor(QPalette::AlternateBase, QColor(53,53,53));
darkPalette.setColor(QPalette::ToolTipBase, Qt::white);
darkPalette.setColor(QPalette::ToolTipText, Qt::white);
darkPalette.setColor(QPalette::Text, Qt::white);
@cassinaj
cassinaj / battery.lua
Created September 7, 2016 02:25
Awesome battery widget
-- This function returns a formatted string with the current battery status. It
-- can be used to populate a text widget in the awesome window manager. Based
-- on the "Gigamo Battery Widget" found in the wiki at awesome.naquadah.org
local naughty = require("naughty")
local beautiful = require("beautiful")
function readBatFile(adapter, ...)
local basepath = "/sys/class/power_supply/"..adapter.."/"
for i, name in pairs({...}) do
@cassinaj
cassinaj / rc.lua
Created September 7, 2016 02:25
Awesome config
-- Standard awesome library
require("awful")
require("awful.autofocus")
require("awful.rules")
-- Theme handling library
require("beautiful")
-- Notification library
require("naughty")
-- Load Debian menu entries
@cassinaj
cassinaj / build-emacs.sh
Created September 4, 2016 23:16 — forked from favadi/build-emacs.sh
Compile latest emacs version (24.5) in Ubuntu 14.04
#!/bin/bash
# Build latest version of Emacs, version management with stow
# OS: Ubuntu 14.04 LTS
# version: 24.5
# Toolkit: lucid
# Warning, use updated version of this script in: https://github.com/favadi/build-emacs
set -e
@cassinaj
cassinaj / spacemacs-cheatsheet.txt
Created April 15, 2016 17:59 — forked from davoclavo/spacemacs-cheatsheet.md
Spacemacs cheatsheet
`emacs --daemon` to run in the background.
`emacsclient.emacs24 <filename/dirname>` to open in terminal
NOTE: "M-m and SPC can be used interchangeably".
* Undo - `C-/`
* Redo - `C-?`
* Change case: 1. Camel Case : `M-c`
2. Upper Case : `M-u`
3. Lower Case : `M-l`
@cassinaj
cassinaj / 1_ubuntu_terminal_command
Created February 7, 2016 11:38 — forked from lucasdavila/1_ubuntu_terminal_command
Installing Source Code Pro fonts in ubuntu
# to execute this gist, run the line bellow in terminal
\curl -L https://raw.github.com/gist/3875946/install_source_code_pro.sh | sh
---
# custom settings
Language: Cpp
Standard: Cpp11
IndentWidth: 4
TabWidth: 4
AccessModifierOffset: -4
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme version="1.0" name="Solarized (light) - myway">
<style name="Text" foreground="#657b83" background="#fdf6e3"/>
<style name="Link" foreground="#268bd2"/>
<style name="Selection" foreground="#eee8d5" background="#93a1a1"/>
<style name="LineNumber" foreground="#93a1a1" background="#eee8d5"/>
<style name="SearchResult" background="#ffffb0"/>
<style name="SearchScope" foreground="#000000" background="#fff9f6"/>
<style name="Parentheses" foreground="#dc322f"/>
<style name="CurrentLine" background="#eee8d5"/>
@cassinaj
cassinaj / clang-format_config.md
Created November 16, 2015 19:35 — forked from Uflex/clang-format_config.md
Configuration of clang-format for QtCreator

Clang-format in QtCreator

Edit: QtCreator 3.1 introduced a new plugin called Beautifier that supports clang-format. You still have to install the clang tools separately but you don't have to add them as external tools anymore. The plugin can be configured in the options dialog under the beautifier tab > Clang Format. Add a new style and copy the configuration below without the curly braces.

QtCreator doesn't allow using clang-format by default. Watch QTCREATORBUG-10111 for a better integration. As of today, you should use it as an external tool, either replacing your selection or the entire file. If you choose to replace the file, you will have to save it before launching the tool and QtCreator will reload the file, making it impossible to undo/redo afterwards. If you choose to replace your selection, you often have to select the whole function, otherwise you will lose the indentation; clang-format doesn't seem to k