Skip to content

Instantly share code, notes, and snippets.

View jlgerber's full-sized avatar

jlgerber

View GitHub Profile
@jlgerber
jlgerber / CMakeLists.txt
Created December 31, 2016 23:47
cmake - specify location where executables and libraries get built
# I like putting artifacts in a private directory in the build tree. Here is how i do it
# define where executable products go
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/private/bin)
# define where library products go
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/private/lib)
@jlgerber
jlgerber / CMakeLists.txt
Last active December 31, 2016 23:44
cmake - ad hoc locating of external library and includes. EG libyaml-cpp.a
#
# FIND libyaml-cpp.a
#
find_library(LIBYAML libyaml-cpp.a)
find_path(LIBYAML_INC yaml-cpp/yaml.h)
if(NOT LIBYAML)
# FATAL_ERROR will fail the CMakeLists.txt processing
message(FATAL_ERROR "Unable to find libyaml")
endif()
if(NOT LIBYAML_INC)
@jlgerber
jlgerber / CMakeLists.txt
Last active December 14, 2023 07:52
cmake - handling executable and library with same name
# Lets say we want to add a library and an executable, both with the same name.
# In this example, it is resman
add_library(resman ${src_cpps} ${src_hpps} )
target_link_libraries(resman ${Boost_LIBRARIES} ${LIBYAML} ${LIBFMT})
#
# Add resman executable
#
# We call the executable resman-bin
add_executable(resman-bin main.cpp )
#![feature(custom_derive, plugin)]
#![feature(custom_attribute)]
#![plugin(serde_macros)]
extern crate serde;
extern crate serde_json;
use serde::ser::Serializer;
fn main() {
@jlgerber
jlgerber / neonAnimationBehavior.js
Last active December 21, 2016 08:03
custom neon animation behavior...not working
<link rel="import" href="../../bower_components/polymer/polymer.html">
<link rel="import" href="../../bower_components/neon-animation/neon-animation-behavior.html">
<!-- <link rel="import" href="../../bower_components/web-animations-js/web-animations.html"> -->
/*
grow-width-animation
config: {
node:<the node to operate on>
width: <string> the width in pixels to end on.
}
@jlgerber
jlgerber / git_cmds.sh
Last active December 21, 2016 08:03
git commands
git log --oneline --graph --all --decorate # print the log, one line per commit, show a graph, for all branches, and decorate with the name of the branch
You can go ahead and create an alias for this or any command
git config --global alias.logv 'log --oneline --graph --all --decorate'
This is stored in ~/.gitconfig under [alias]
--------------
If you want the status of your local repo to be reflected in your prompt, you can make use of the following project:
https://github.com/djl/vcprompt