This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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. | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(custom_derive, plugin)] | |
#![feature(custom_attribute)] | |
#![plugin(serde_macros)] | |
extern crate serde; | |
extern crate serde_json; | |
use serde::ser::Serializer; | |
fn main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# adapted from Chad Vernon's wonderful video series | |
# only tested on OSX so far | |
# to use, set the CMAKE_MODULE_PATH to point at this file. | |
# CACHE keyword allows us to pass in from the command line | |
if(NOT DEFINED MAYA_VERSION) | |
set(MAYA_VERSION 2017 CACHE STRING "Maya version") | |
endif() | |
set(MAYA_COMPILE_DEFINITIONS "REQUIRE_IOSTREAM;_BOOL") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from http://stackoverflow.com/questions/5188320/how-can-i-get-a-list-of-git-branches-ordered-by-most-recent-commit | |
git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static STUFF: &'static [&'static str] = &[ | |
"foo", | |
"bar", | |
"bla", | |
"crar", | |
"mala", | |
"court", | |
"dupla", | |
"fooobas", | |
"lalalala", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::any::Any; | |
trait Schema { | |
fn eq(&self, other: &Schema) -> bool; | |
fn as_any(&self) -> &Any; | |
} | |
impl<'a, 'b> PartialEq<Schema+'b> for Schema+'a { | |
fn eq(&self, other: &(Schema+'b)) -> bool { | |
Schema::eq(self, other) |
OlderNewer