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
@dcode
dcode / build_bro_nightly.sh
Last active July 25, 2019 04:33
Build Bro nightly & bro-plugins on CentOS 7.x
# Build Bro from Source on CentOS 7
## Install EPEL
sudo yum -y install epel-release
## Install runtime dependencies - These will be needed once the RPM is built
sudo yum -y install libpcap openssl-libs bind-libs zlib bash python libcurl gawk GeoIP jemalloc
## Install the build dependencies
sudo yum -y install @development libpcap-devel openssl-devel bind-devel zlib-devel cmake git perl libcurl-devel GeoIP-devel python-devel jemalloc-devel swig rpmdevtools
@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)

@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;
@koistya
koistya / DefaultLayout.jsx
Last active July 1, 2021 16:05
React.js (ReactJS) Page and Layout components. For a complete sample visit https://github.com/kriasoft/react-starter-kit and http://reactjs.kriasoft.com (demo)
/**
* Page layout, reused across multiple Page components
* @jsx React.DOM
*/
var React = require('react');
var ExecutionEnvironment = require('react/lib/ExecutionEnvironment');
var Navigation = require('../components/Navigation.jsx');
var DefaultLayout = React.createClass({
@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>
)} />
)
@potench
potench / arcanist.md
Last active November 25, 2021 20:44
Install Phabricator on OSX and Install arcanist

OSX Arcanist Installation Guide

Note, please replace "WWW/tools" with where ever you store your web tools.

$ mkdir ~/WWW/tools
$ cd ~/WWW/tools
$ git clone https://github.com/phacility/libphutil.git
$ git clone https://github.com/phacility/arcanist.git
@adamgibbons
adamgibbons / install-mongodb.md
Last active January 17, 2023 15:17
Install MongoDB on Mac OS X 10.9

Install MongoDB with Homebrew

brew install mongodb
mkdir -p /data/db

Set permissions for the data directory

Ensure that user account running mongod has correct permissions for the directory:

@ikstob
ikstob / AddMeFastExample.java
Created November 19, 2012 19:38
Example of using Selenium from Java
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.ExpectedCondition;
@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

@rstacruz
rstacruz / index.md
Last active November 3, 2023 09:56
Rails models cheatsheet

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one