Skip to content

Instantly share code, notes, and snippets.

@RomkeVdMeulen
RomkeVdMeulen / up.sh
Created February 4, 2015 20:33
Script for automatically updating a number of projects in your workspace
#!/bin/bash
###############################################
# #
# Auto-update externals #
# #
# Will go into your workspace (~/workspace) #
# and `git pull` all projects listed in #
# .git-auto-pull, and will `svn up` all #
# projects listed in .svn-auto-up #
@clobrano
clobrano / ubuntu-post-install.sh
Last active December 28, 2015 03:49
This is a script to install common utilities on a (K)Ubuntu machine just after installed the OS (Tested on Elementary OS)
#!/bin/bash
Author="Carlo Lobrano"
Email="bytefalls@gmail.com"
Version="2.2"
Date="2014-05-25"
Project="Ubuntu-derived OS post install script"
# Changelog
# 2014-06-07 Added indicator-cpufreq to eos (remember to copy the icons)
# 2014-05-25 Separated package installation from ppa add.
@loganakamatsu
loganakamatsu / mute.sh
Created April 25, 2016 15:58
(Un)Mute OS X
# works nicely as an Automator 'run shell script' task
osascript -e 'set volume output muted true'
@matthiasbeyer
matthiasbeyer / select_remind_entry.sh
Last active March 8, 2017 18:17
remind entry to ics with selection
#!/bin/bash
#
# The following script is a ugly hack. But it works, so yeah \m/
#
# It uses awk, cut, head, tail, rem2ics and fzf (whereas this is only for the
# selection-process and could be replaced).
#
# Purpose:
#
@spartanroc
spartanroc / BibTeXKeyOnly.js
Created May 5, 2011 06:17
New Features and Improvements on Zotero's Support of BibTeX Export
{
"translatorID": "12345",
"label": "BibTeX CiteKey-only Exporter",
"creator": "Simon Kornblith and Richard Karnesky with tweaks by Tan",
"target": "bib",
"minVersion": "2.1.9",
"maxVersion": "",
"priority": 200,
"inRepository": false,
"translatorType": 3,
@sehe
sehe / .gitignore
Last active July 8, 2020 11:07
converting regular expressions to dot graphs (with boost spirit)
*.o
a.out
test
.*.swp
*~
*.png
tags
@abyx
abyx / angular-error-handling.js
Last active February 4, 2022 19:19
AngularJS HTTP Error Handling Mechanism
var HEADER_NAME = 'MyApp-Handle-Errors-Generically';
var specificallyHandleInProgress = false;
angular.module('myApp').factory('RequestsErrorHandler', ['$q', function($q) {
return {
// --- The user's API for claiming responsiblity for requests ---
specificallyHandled: function(specificallyHandledBlock) {
specificallyHandleInProgress = true;
try {
return specificallyHandledBlock();
@mbadran
mbadran / gist:130469
Created June 16, 2009 01:30
replace cd in bash to (silent) pushd
alias cd="pushd $@ > /dev/null"
# This gist is compatible with Ansible 1.x .
# For Ansible 2.x , please check out:
# - https://gist.github.com/dmsimard/cd706de198c85a8255f6
# - https://github.com/n0ts/ansible-human_log
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
@Som1Lse
Som1Lse / deps.md
Last active January 4, 2023 12:44
CMake dependency flexibility

What we want to do

Lets say we have a library that is part of a larger CMake project, and we want to seperate it out so it can be used in more projects. For the sake of convenience lets say it is already largely seperate from the parent project, i.e. in its own directory with a CMakeLists.txt, and referenced with add_subdirectory from the parent project.

In order to fully seperate it we need to:

  1. Make it buildable on its own. If it has depencies, it needs to use find_package itself to find them. If it has