Skip to content

Instantly share code, notes, and snippets.

View tommy3531's full-sized avatar
🏠
Working from home

Tom Marler tommy3531

🏠
Working from home
View GitHub Profile
@fmbenhassine
fmbenhassine / MyJob.java
Last active May 17, 2020 20:54
Spring Batch example of how to use a ClassifierCompositeItemWriter #SpringBatch https://stackoverflow.com/questions/53377660
package org.springframework.batch.sample;
import java.util.Arrays;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobParameters;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory;
import org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
@harrietty
harrietty / RAILS_5_CHEATSHEET.md
Last active August 13, 2023 00:36 — forked from mdang/RAILS_CHEATSHEET.md
Ruby on Rails 5 Cheatsheet

Ruby on Rails Cheatsheet (5.1)

Architecture

RVM

$ rvm list - show currently installed Rubies

@cdiggins
cdiggins / react-best-practices.md
Created January 25, 2018 16:20
React Best Practices
@Geoyi
Geoyi / install virtualenv ubuntu 16.04.md
Created September 16, 2017 12:19 — forked from frfahim/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
@barseghyanartur
barseghyanartur / ELK with Nginx.md
Created September 8, 2017 15:20 — forked from Dev-Dipesh/ELK with Nginx.md
Setting up Elasticsearch, Logstash and Kibana with Nginx.

ELK (Elasticsearch Logstash Kibana)

Though we're focused more on server setup procedure in this document, I will still give a very brief explanation in laymen terms for ELK. To those who are starting new in this stack, must have already heard of MVC (Model View Controller), so take it like this:

  • Model => Elasticsearch (for Storage, Indexing & Search)
  • View => Kibana (for DataViz & G-Man, yeah the one in half life 😏)
  • Controller => Logstash (For Logs & Filtering)

@avinmathew
avinmathew / index.jsx
Created August 8, 2017 11:54
Multiple layouts with React Router v4
import React from "react"
import { Route, Switch } from "react-router-dom"
const AppRoute = ({ component: Component, layout: Layout, ...rest }) => (
<Route {...rest} render={props => (
<Layout>
<Component {...props} />
</Layout>
)} />
)
@jagrosh
jagrosh / Growing A Discord Server.md
Last active February 17, 2024 04:29
Tips for creating and growing a new Discord server

This guide is kept up-to-date as Discord and available resources change!
A basic server template is available here

Creating and Growing a Discord Server

logo

Introduction

Hello! I'm jagrosh#4824! I'm writing this guide to try to help new server owners set up and grow their servers, which is a commonly-requested topic. It's very easy to go about this the wrong way, so it's best to be prepared and make smart decisions so that your community can flourish!

Background

@DhavalDalal
DhavalDalal / Attention.md
Last active February 12, 2024 12:09
Loyalty Points - Java

Loyalty Points (Java)

  • You can use Gradle to create a Java Project - you can name it LoyaltyPoints.
  • Copy PointsCalculatorTest.java under package loyaltyPoints within src/test/java
  • Copy Tier.java, PrivilegeService.java, PointsCalculator.java and Customer.java under package loyaltyPoints within src/main/java
  • Add JUnit4 or JUnit5 Jar or latest JUnit as a test dependency.
  • Run the tests to get a green bar.

An airline has following rules for calculating bonus amount for loyalty points for a customer based on which tier they are in:

@patpohler
patpohler / Big List of Real Estate APIs.md
Last active April 27, 2024 22:46
Evolving list of Real Estate APIs by Category

Big List of Real Estate APIs

Listings / Property Data

####Rets Rabbit http://www.retsrabbit.com

Rets Rabbit removes the nightmare of importing thousands of real estate listings and photos from RETS or ListHub and gives you an easy to use import and Web API server so you can focus on building your listing search powered website or app.

@mdang
mdang / RAILS_CHEATSHEET.md
Last active April 13, 2024 15:36
Ruby on Rails Cheatsheet

Ruby on Rails Cheatsheet

Architecture

Create a new application

Install the Rails gem if you haven't done so before