Skip to content

Instantly share code, notes, and snippets.

View cob16's full-sized avatar

Cormac Brady cob16

View GitHub Profile
@mkottman
mkottman / twoline_prompt.sh
Last active July 19, 2023 06:53
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\]"
@benpickles
benpickles / gist:2596158
Created May 4, 2012 16:48
WebMock.last_request
# Thankyou Bartosz Blimke!
# https://twitter.com/bartoszblimke/status/198391214247124993
module LastRequest
def last_request
@last_request
end
def last_request=(request_signature)
@last_request = request_signature
@gregology
gregology / dashboard
Last active December 8, 2020 14:19
Service script for dashing. Update DASHING_DIR variable, add this file to /etc/init.d/ , chmod to 755, and let update rc.d with $ sudo update-rc.d dashboard defaults This scripts stops the dashing service with "killall thin" which will kill all thin services running on your server.
#!/bin/bash
# Dashing service
# Add this file to /etc/init.d/
# $ sudo cp dashboard /etc/init.d/
# Update variables DASHING_DIR, GEM_HOME, & PATH to suit your installation
# $ sudo nano /etc/init.d/dashboard
# Make executable
# $ sudo chmod 755 /etc/init.d/dashboard
# Update rc.d
# $ sudo update-rc.d dashboard defaults
@garrappachc
garrappachc / noAds.js
Last active May 8, 2020 20:28
tf2center adblock fix
// ==UserScript==
// @name noads.js
// @namespace https://gist.githubusercontent.com/Garrappachc/ed61cb22e160cc2a6ac247b352950161/raw/44d44f12be88148a1cbc14617e205cacbb1035b3/noAds.js
// @description TF2Center adblock fix
// @include https://tf2center.com/lobbies
// @require https://gist.github.com/raw/2620135/checkForBadJavascripts.js
// @version 2
// @run-at document-start
// @grant GM_addStyle
// ==/UserScript==