Skip to content

Instantly share code, notes, and snippets.

View tullo's full-sized avatar

Andreas tullo

  • localhost
  • 01:34 (UTC +02:00)
View GitHub Profile
@tullo
tullo / gist:1658444
Created January 22, 2012 19:49
Dummy SMTP server for testing #java
java -jar DevNullSmtp.jar
# It is a dummy SMTP server that can be used for testing purposes.
# It helps you see all communication between a client and the server and is very useful if you are trying to find problems with your email server or a client that you wrote.
http://www.aboutmyip.com/AboutMyXApp/DevNullSmtp.jsp
java -jar dumbster.jar 7777
# SMTP fake server for QA, running on port 7777)
# https://github.com/rjo1970/dumbster.git
@tullo
tullo / alfrescoBackup.sh
Created April 13, 2013 13:22
Creates a cold backup of Alfresco
#
# Cold backup of Alfresco.
#
# Configuration.
ALF_HOME="/path/to/alfresco"
NUM_DUMP=10
ALF_DATA_SUBDIR="alf_data"
DB_TYPE="postgresql"
DBNAME="alfresco"
@tullo
tullo / gist:5378545
Created April 13, 2013 14:09
crontab def for daily execution of an alfresco backup script at 4 a.m.
0 4 * * * /path/to/alfresco/alfrescoBackup.sh /path/to/backup/folder
30 13 * * * /home/username/run-me.sh >/dev/null 2>&1
0 * * * * curl --silent --compressed http://example.com/cron.php >/dev/null 2>&1
crontab filename Install filename as your crontab file,
crontab -e Edit your crontab file, or create one if it doesn’t already exist.
var dataListItem = search.findNode("workspace://SpacesStore/f4716370-bad6-451b-906a-d93b806f5d97");
var targetNode = search.findNode("workspace://SpacesStore/831d3f4f-4c15-4b59-91b3-6de50ee8dfe8");
dataListItem.createAssociation(targetNode, "lyse:document");
dataListItem.save();

Keybase proof

I hereby claim:

  • I am tullo on github.
  • I am tullo (https://keybase.io/tullo) on keybase.
  • I have a public key whose fingerprint is AFF3 3284 DA3E 7937 BF5A 11C7 F314 11C7 556D 846F

To claim this, I am signing this object:

@tullo
tullo / git-clearHistory
Created December 9, 2018 19:56
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@tullo
tullo / git-flatten-history.md
Last active December 9, 2018 20:40 — forked from adeluccar/gist:d105299f2d5af55e3e96f9b989e7eb48
How to Flatten the History of a Git Repository Safely
git checkout --orphan future-master
git add -A  # Add all files and commit them
git commit
git branch -D master  # Deletes the master branch
git branch -m master  # Rename the current branch to master
git push -f origin master  # Force push master branch to github
git gc --aggressive --prune=all     # remove the old files
@tullo
tullo / Makefile
Created December 9, 2018 21:22
Makefile for Go Projects
GOPATH=$(shell pwd)/vendor:$(shell pwd)
GOBIN=$(shell pwd)/bin
GOFILES=$(wildcard *.go)
GONAME=$(shell basename "$(PWD)")
PID=/tmp/go-$(GONAME).pid
build:
@echo "Building $(GOFILES) to ./bin"
@GOPATH=$(GOPATH) GOBIN=$(GOBIN) go build -o bin/$(GONAME) $(GOFILES)
@tullo
tullo / crawler.go
Last active March 5, 2019 16:08 — forked from hello-josh/crawler.go
A Tour of Go - Exercise: Web Crawler
package main
import (
"fmt"
"sync"
)
type Fetcher interface {
// Fetch returns the body of URL and
// a slice of URLs found on that page.
@tullo
tullo / run.tpl
Created December 15, 2020 00:22 — forked from efrecon/run.tpl
`docker inspect` template to regenerate the `docker run` command that created a container
docker run \
--name {{printf "%q" .Name}} \
{{- with .HostConfig}}
{{- if .Privileged}}
--privileged \
{{- end}}
{{- if .AutoRemove}}
--rm \
{{- end}}
{{- if .Runtime}}