Skip to content

Instantly share code, notes, and snippets.

@hofmannsven
hofmannsven / README.md
Last active May 3, 2024 15:30
Git CLI Cheatsheet
@aslakknutsen
aslakknutsen / start_testing_java8_today.asciidoc
Last active October 11, 2023 20:07
Example of how to use both JDK 7 and JDK 8 in one build.

JDK 8 Released

Most of us won’t be able to use/deploy JDK 8 in production for a looong time. But that shouldn’t stop us from using it, right?

It should be possible to sneak in JDK 8 in the back way, the same way we snuck in Groovy and other libraries we wanted to use.

The Test Suite to the rescue

The Maven compiler plugin run in two separate lifecycles, compile and testCompile. Those can be configured separately.

@fclairamb
fclairamb / log4j2.rolling.xml
Last active April 6, 2023 16:45
log4j2.xml sample setup files: * rolling: To enable rolling logging. * setup file to log on file (rotation should be handled by logrote), syslog (to collect all the logs from the different services) and console...
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<properties>
<property name="name">app</property>
<property name="pattern">%d{yyyy-MM-dd HH:mm:ss.SSS} | %-5.5p | %-10.10t | %-20.20C:%-5.5L | %msg%n</property>
<!--
It will look like that:
2013-04-03 07:37:51.993 | WARN | main | lnetgateway.Server:56 | My app is logging stuff
-->
</properties>
@bijukunjummen
bijukunjummen / gist:3315275
Created August 10, 2012 16:08
Test Cache with Spring Cache Abstraction
package org.bk.samples.cache;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import org.junit.Test;
@smathot
smathot / clickplot.py
Created March 10, 2012 13:31
Clickable interactive matplotlib figure
#!/usr/bin/env python
#-*- coding:utf-8 -*-
from matplotlib import pyplot
import numpy as np
class ClickPlot:
"""
A clickable matplotlib figure
@jonathandixon
jonathandixon / .gitignore
Last active January 5, 2021 22:01
Cordova CLI project .gitignore and helper script. Useful when you don't want to commit the platforms and plugins directories to version control. http://stackoverflow.com/q/17911204/417568
platforms/
plugins/
@jonathandixon
jonathandixon / Grunt-Cordova-CLI.md
Last active January 5, 2021 22:00
Using Grunt with a Cordova 3 project.

Grunt and Cordova 3

The advantages of using Grunt with Cordova:

  1. It simplifies working with the cordova cli.
  2. It provides a mechanism to copy platform customization to the platforms directory without having to commit the generated plugins and platforms directories to version control.
  3. It provides a way to watch resources and automatically run cordova commands.

Stack Overflow: .gitignore for PhoneGap/Cordova 3.0 projects - what should I commit?

# Create first network with Keras
from keras.models import Sequential
from keras.layers import Dense
import numpy
import threading as t
import tensorflow as tf
graph = tf.get_default_graph()
def t_thread():
@elswork
elswork / Readme.md
Last active June 20, 2019 13:55
Data Science Docker Stack

Data Science Docker Stack

This set of Docker images were developed to provide a fast and reproducible way to play, develop and learn with Tensorflow under Python environment, from minimal installation to a complete one including JupyterLab computational environment and OpenCV (Open Source Computer Vision Library). Use or build images for amd64 or arm32v7 architectures without hassle, the whole set is Multi-Arch designed. Get latest versions and switch between them while keep clean your system.

Features Chart

GitHub Python2 Python3 Tensorflow JupyterLab OpenCV
@tbranyen
tbranyen / backbone.collectioncache.js
Created June 4, 2012 06:37
Backbone.Collection caching by URL
/*!
* backbone.collectioncache.js v0.0.2
* Copyright 2012, Tim Branyen (@tbranyen)
* backbone.collectioncache.js may be freely distributed under the MIT license.
*/
(function(window) {
"use strict";
// Dependencies