Skip to content

Instantly share code, notes, and snippets.

View atlasloewenherz's full-sized avatar

Yassine Elassad atlasloewenherz

  • Bonn
  • 04:28 (UTC +02:00)
View GitHub Profile
@peterc
peterc / gist:40239
Created December 27, 2008 11:31
Configuration loading library for Sinatra apps
# NAME: configurator
# VERSION: 1.0
# AUTHOR: Peter Cooper [ http://www.rubyinside.com/ github:peterc twitter:peterc ]
# DESCRIPTION: Sinatra library to load app-wide configurations
# COMPATIBILITY: All, in theory - tested on Hoboken
# LICENSE: Use for what you want
#
# INSTRUCTIONS:
# 1. Ensure _this_ file is lib/initializer.rb within your app's directory structure
# 2. Add require 'lib/configurator' to your Sinatra app
@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
@mhawksey
mhawksey / gist:1170597
Created August 25, 2011 13:02
Google Apps Script to fill in a Document template with Spreadsheet data
function onOpen() {
var menuEntries = [ {name: "Create Diary Doc from Sheet", functionName: "createDocFromSheet"}];
var ss = SpreadsheetApp.getActiveSpreadsheet();
ss.addMenu("Fitness Diaries", menuEntries);
}
function createDocFromSheet(){
var templateid = "1O4afl8SZmMxMFpAiN16VZIddJDaFdeRBbFyBtJvepwM"; // get template file id
var FOLDER_NAME = "Fitness Diaries"; // folder name of where to put completed diaries
// get the data from an individual user
@phred
phred / pedantically_commented_playbook.yml
Last active June 27, 2024 13:39
Very complete Ansible playbook, showing off all the options
---
####
#### THIS IS OLD AND OUTDATED
#### LIKE, ANSIBLE 1.0 OLD.
####
#### PROBABLY HIT UP https://docs.ansible.com MY DUDES
####
#### IF IT BREAKS I'M JUST SOME GUY WITH
#### A DOG, OK, SORRY
####
@mrrooijen
mrrooijen / README.md
Last active July 3, 2024 21:31
Setting up XEN on a Hetzner Dedicated Server

Setting up XEN on a Hetzner Dedicated Server

Author: Michael van Rooijen (@mrrooijen)

DISCLAIMER: I am a programmer, not a sysadmin in my day-to-day life. I provide this guide simply as a self-reference, and as a way to contribute to the community of developers. The main motivation for writing this guide is because of the lack of properly written guides/tutorials. They were either out-dated, inaccurate, in a non-English language or simply too vague to understand (at least for me, as a programmer and not a sysadmin).

I hope this guide helps getting you up and running with your own collection of VPS's on your own Dedicated Server over at Hetzner.de.

Requirements:

@beezly
beezly / gist:4250079
Created December 10, 2012 11:24
Google Script Spreadsheet function to iterate over all cells and insert the value 0 if the cell is blank
function zeroCells() {
var ss=SpreadsheetApp.getActiveSpreadsheet();
var sheet=ss.getSheets()[0];
var selection=sheet.getDataRange();
var columns=selection.getNumColumns();
var rows=selection.getNumRows();
for (var column=1; column < columns; column++) {
for (var row=1; row < rows; row++) {
var cell=selection.getCell(row,column);
if (cell.isBlank()) {
@mmalmeida
mmalmeida / gist:5934939
Last active December 19, 2015 09:39
fail2ban - tomcat
jail:
[tomcat-manager]
enabled = true
port = 8080,8443
bantime = 3601
filter = tomcat-manager
maxretry = 4
logpath = /var/log/tomcat7/localhost_access_log.*.txt
@adityasatrio
adityasatrio / TripleDesBouncyCastle.java
Last active February 1, 2021 07:21
Triple des bouncy castle.
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package asn.helpers;
/**
*
* @author asn
*/
@chrisgilbert
chrisgilbert / gist:58f57c82f74162ed5c0f
Last active June 25, 2021 19:17
Run Ansible or Ansible-Playbook from Rundeck
#!/bin/bash
# Interpret whether the input needs to go to ansible, or ansible-playbook and run appropriately
# First update the git repos for each project
/usr/bin/update-git-repos
export ANSIBLE_FORCE_COLOR=1
export ANSIBLE_RETRY_FILES_ENABLED=False
@atlasloewenherz
atlasloewenherz / gist:beaaa128ae24f09e700c43ab1ddedd2c
Created April 26, 2016 20:10 — forked from philips/gist:6785381
Booting the CoreOS XEN PXE under qemu
#!/bin/bash
XEN=xen-4.1-amd64
KERNEL=vmlinuz.coreos.xen
INITRD=coreos_developer_pxe_image.cpio.gz
COREOS_ARGS="root=squashfs: state=tmpfs:"
XEN_ARGS="console=hvc0 earlyprintk=xen"
CPU=host
# Qemu can't deal with gzip'd kernels