Skip to content

Instantly share code, notes, and snippets.

@ravishi
ravishi / ubuntu-post-install.sh
Last active November 8, 2019 12:02
My post install script for Ubuntu
#!/bin/bash
# TODO
# - Automatically fix the "Unknown display" problem by editing grub defaults
# like described here: http://askubuntu.com/questions/398903/unknown-display-besides-laptop-built-in-display-old-question-but-with-no-answer
##
## Essential stuff
##
sudo apt-get install -y build-essential aria2 git mercurial subversion \
@fxsjy
fxsjy / SimpleAuthServer.py
Created April 26, 2013 06:23
SimpleAuthServer: A SimpleHTTPServer with authentication
import BaseHTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
import sys
import base64
key = ""
class AuthHandler(SimpleHTTPRequestHandler):
''' Main class to present webpages and authentication. '''
def do_HEAD(self):
@fforbeck
fforbeck / jenkins-setup-ubuntu13.04
Last active December 17, 2015 10:18
Setup Jenkins Environment on Ubuntu 13.04
## Default setup: http://pkg.jenkins-ci.org/debian/
## Setup with oracle-jdk, mvn3, git, nginx and useful jenkins plugins
Remove OpenJDK first if installed by this command:
sudo apt-get purge openjdk*
Then add the Webupd8 Team PPA repository and then reload the packages:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
@karmi
karmi / .gitignore
Last active November 12, 2022 12:11
Example Nginx configurations for Elasticsearch (https://www.elastic.co/blog/playing-http-tricks-nginx)
nginx/
!nginx/.gitkeep
!nginx/logs/.gitkeep
src/
tmp/
@jewzaam
jewzaam / gist:5a9496f1ca2e5feb07bb
Last active April 1, 2019 08:27
MongoDB replica set in docker
# get it
docker pull mongo
# startup a 3 node replica set
docker run --name mongo-rs-1 -d mongo --nojournal --oplogSize 10 --replSet rs
docker run --name mongo-rs-2 -d mongo --nojournal --oplogSize 10 --replSet rs
docker run --name mongo-rs-3 -d mongo --nojournal --oplogSize 10 --replSet rs
# connect to first node
docker run -it --link mongo-rs-1:mongo1 --link mongo-rs-2:mongo2 --link mongo-rs-3:mongo3 --rm mongo /bin/bash
@jcdarwin
jcdarwin / monit-and-gmail
Last active February 12, 2023 11:10
How to allow monit to use gmail as a smtp relay to send out alert emails
# visit https://accounts.google.com/DisplayUnlockCaptcha and click to allow access
# edit /etc/monit/monitrc to include the following
set mailserver smtp.gmail.com port 587
username "whoever@gmail.com" password "whatever"
using tlsv1
with timeout 30 seconds
# run the following to validate access
@kensipe
kensipe / mesos-dns-setup-notes.md
Created May 29, 2015 17:03
details for setting up mesos-dns with docker

Mesos-DNS

Scripts for setting up

sudo mkdir /etc/mesos-dns
sudo vi /etc/mesos-dns/config.json

config.json

@elfurbe
elfurbe / docker-compose.yml
Created July 9, 2015 00:41
ES Rancher Service Prototype
ES-Masters:
tty: true
command:
- elasticsearch
- -Des.cluster.name=sansabelt
- -Des.node.master=true
- -Des.node.data=false
- -Des.discovery.zen.ping.multicast.enabled=false
- -Des.discovery.zen.ping.unicast.hosts=datas,clients
image: elasticsearch
@eyecatchup
eyecatchup / git-commit-log-stats.md
Last active July 12, 2024 09:40
Some commands to get git commit log statistics for a repository on the command line.

git commit stats

Commands to get commit statistics for a Git repository from the command line -
using git log, git shortlog and friends.