Skip to content

Instantly share code, notes, and snippets.

View bnortman's full-sized avatar
🎯
Focusing Dependency Mapping

Cap10Bill bnortman

🎯
Focusing Dependency Mapping
View GitHub Profile
@mkottman
mkottman / twoline_prompt.sh
Last active March 20, 2025 14:14
A two-line colored Bash prompt (PS1) with Git branch and a line decoration which adjusts automatically to the width of the terminal. Recognizes SVN, Git and Fossil version control systems and shows the current branch/revision.
# A two-line colored Bash prompt (PS1) with Git branch and a line decoration
# which adjusts automatically to the width of the terminal.
# Recognizes and shows Git, SVN and Fossil branch/revision.
# Screenshot: http://img194.imageshack.us/img194/2154/twolineprompt.png
# Michal Kottman, 2012
RESET="\[\033[0m\]"
RED="\[\033[0;31m\]"
GREEN="\[\033[01;32m\]"
BLUE="\[\033[01;34m\]"
@btoone
btoone / curl.md
Last active December 8, 2024 05:16
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@justingarrick
justingarrick / opengrok.txt
Last active September 19, 2018 06:18
Setup OpenGrok on Tomcat (/w LDAP) to Search SVN
These instructions are an amalgamation of those posted at http://jdevel.wordpress.com/2011/03/26/running-opengrok-on-windows/ and my own experience.
To setup OpenGrok on Windows running under Tomcat:
1. Download OpenGrok binary. Just go to OpenGrok Home and download the latest (0.10, currently) binary
2. Download ctags. Just go to ctags, download windows zip file and extract it somewhere.
3. Edit web.xml. You need to extract lib/source.war somewhere and modify WEB-INF/web.xml slightly. I’ve modified the CONFIGURATION param to point to my generated configuration.xml file(more about it later) and added SRC_ROOT and DATA_ROOT to point to folder with sources to index and folder that OpenGrok should keep it’s data in (I’m not sure if these two are needed if you pass in configuration.xml)
<context-param>
<param-name>CONFIGURATION</param-name>
<param-value>D:/GrokTest/configuration.xml</param-value>
@thomasmassmann
thomasmassmann / Vagrantfile
Last active August 26, 2018 00:24
Create a vagrant box with chef server provisioning and automatic client and node cleanup on the server when the vagrant box gets destroyed. All necessary api keys and config options are taken from environment variables. The knife.rb must live inside a .chef directory besides the Vagrantfile.
# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'chef'
Chef::Config.from_file(File.join(File.dirname(__FILE__), '.chef', 'knife.rb'))
vms = {
"testbox" => {
:box => "precise64",
:ipaddress => "192.168.33.10",
@fernandoaleman
fernandoaleman / gist:5083680
Last active October 17, 2023 12:02
How to update VirtualBox Guest Additions with vagrant
# Start the old vagrant
$ vagrant init centos-6.3
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
# this machine, please update the guest additions and repackage the
# box.
@robwierzbowski
robwierzbowski / gitcreate.sh
Last active December 27, 2024 11:23
A simple litte script. Create and push to a new github repo from the command line.
#!/bin/bash
# https://gist.github.com/robwierzbowski/5430952/
# Create and push to a new github repo from the command line.
# Grabs sensible defaults from the containing folder and `.gitconfig`.
# Refinements welcome.
# Gather constant vars
CURRENTDIR=${PWD##*/}
GITHUBUSER=$(git config github.user)
@vratiu
vratiu / .bash_aliases
Last active April 6, 2025 16:16
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
@rodneyrehm
rodneyrehm / gist:40e7946c0cff68a31cea
Last active March 12, 2025 19:23
Diagrams for Documentation

some tools for diagrams in software documentation

Diagrams For Documentation

Obvious Choices

ASCII

@joekr
joekr / Vagrant
Created February 27, 2015 19:20
Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = '2'
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = 'hashicorp/precise64'
# Configurate the virtual machine to use 2GB of RAM
@PurpleBooth
PurpleBooth / README-Template.md
Last active April 11, 2025 05:14
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites