Skip to content

Instantly share code, notes, and snippets.

View alexproca's full-sized avatar

Alex Proca alexproca

View GitHub Profile
@botanicus
botanicus / PPT.applescript
Last active September 2, 2018 15:34
Launch iTerm2 session with 3 split windows and run commands in them.
-- Find more at http://iterm.sourceforge.net/scripting.shtml
launch "iTerm"
tell application "iTerm"
activate
-- ssh in split panes to my varnish stack
set myterm to (make new terminal)
tell myterm
@dwelch2344
dwelch2344 / pom.xml
Created April 7, 2013 06:25
Executable WAR example via Tomcat Maven Plugin
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<!-- Your stuff here... -->
<build>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
@hengxin
hengxin / How to install Cassandra on Ubuntu?.markdown
Last active May 20, 2020 20:24
How to install Cassandra on Ubuntu?

0. Overview

This article aims to be a portal to installation and configuration of Cassandra. It is self-contained in the first place. It also provides links to the original articles.

Warning: This article is still under written.

Prerequisites

Install Oracle Java Development Kit (JDK)

@searls
searls / maven-git-flow.sh
Created June 24, 2011 00:25
My approximation of nvie's git flow when using maven-release-plugin to cut releases. - http://nvie.com/posts/a-successful-git-branching-model/
# How to perform a release with git & maven following the git flow conventions
# ----------------------------------------------------------------------------
# Finding the next version: you can see the next version by looking at the
# version element in "pom.xml" and lopping off "-SNAPSHOT". To illustrate,
# if the pom's version read "0.0.2-SNAPSHOT", the following instructions would
# perform the release for version "0.0.2" and increment the development version
# of each project to "0.0.3-SNAPSHOT".
# branch from develop to a new release branch
git checkout develop
@mreferre
mreferre / k8s-sa
Created April 26, 2018 12:34
Kubernetes Service Account
# Inspired by: https://stackoverflow.com/questions/42170380/how-to-add-users-to-kubernetes-kubectl
# this script creates a service account (user1) on a Kubernetes cluster (tested with AWS EKS 1.9)
# prereqs: a kubectl ver 1.10 installed and proper configuration of the heptio authenticator
# this has been tested on Linux in a Cloud9 environment (for MacOS the syntax may be slightly different)
**************************************************
******* Create an account *******
**************************************************
# Create service account for user user1
kubectl create sa user1
@primaryobjects
primaryobjects / example.png
Last active June 23, 2022 04:44
A simple navbar for Milligram CSS. See demo at http://jsbin.com/penodof/edit?output
example.png
@azizasm
azizasm / forticlientsslvpn-expect.sh
Last active September 21, 2022 21:10
Continuous run Forticlient VPN using expect. Automatically restart VPN if get disconnected or session closed.
#!/bin/bash
# Forticlient SSL VPN Client / expect
# --------------------------------------------
# CONFIGURATION
FORTICLIENT_PATH=""
@mburakerman
mburakerman / package.json
Last active September 26, 2022 17:32
Webpack 4 config.js (SCSS to CSS and Babel) 👌 The Simplest Usage 👌
{
"name": "webpack-sass",
"version": "1.0.0",
"scripts": {
"start": "webpack-dev-server --open --mode development",
"build": "webpack -p"
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.4",
@darrenderidder
darrenderidder / bashpath.sh
Created May 16, 2011 15:24
Get path of running script in bash
#!/bin/bash
# A simple test script to demonstrate how to find the
# "absolute path" at which a script is running. Used
# to avoid some of the pitfals of using 'pwd' or hard-
# coded paths when running scripts from cron or another
# directory.
#
# Try it out:
# run the script from the current directory, then
@renoirb
renoirb / init.yml
Last active March 30, 2023 03:15
How to install Oracle Java from ppa webupd8team/java using Salt stack, in ONE state file
#
# How to install automatically Oracle Java 7 under Salt Stack
#
# Thanks Oracle for complicating things :(
#
# 1. Create a java/ folder in your salt master
# 2. Paste this file in init.sls
# 3. salt '*' state.sls java
#
# Source: