Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.
/join #channel
- Joins the specified channel.
/part #channel
- Leaves the specified channel.
#!/bin/bash | |
unset GIT_DIR | |
cd /path/to/project | |
# Get our info.... | |
LATEST_TAG=$(git describe --tags --abbrev=0) | |
CURRENT_REVISION=$(git describe) | |
NUMBER_FILES_CHANGED=$(git diff --name-only HEAD $LATEST_TAG | wc -l) | |
#FILES_CHANGED=$(git diff --name-only HEAD $LATEST_TAG) |
import static groovy.json.JsonOutput.* | |
def config = ['test': 'lalala'] | |
println prettyPrint(toJson(config)) |
// Check if a slave has < 10 GB of free space, wipe out workspaces if it does | |
import hudson.model.*; | |
import hudson.util.*; | |
import jenkins.model.*; | |
import hudson.FilePath.FileCallable; | |
import hudson.slaves.OfflineCause; | |
import hudson.node_monitors.*; | |
for (node in Jenkins.instance.nodes) { |
# Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source. | |
# Will include all hosts the playbook is run on. | |
# Inspired from http://xmeblog.blogspot.com/2013/06/ansible-dynamicaly-update-etchosts.html | |
- name: "Build hosts file" | |
lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{item}}" state=present | |
when: hostvars[item].ansible_default_ipv4.address is defined | |
with_items: groups['all'] |
#!/bin/bash | |
BROWSER='google-chrome' | |
#GITLAB_SECRET='' | |
ENDPOINT='http://gitlab.activeby.net/api/v3' | |
PROJECT='activebilling/core' | |
#curl --header "PRIVATE-TOKEN: xxx" "http://gitlab.activeby.net/api/v3/projects/activebilling%2Fcore" | awk '{match($1,"[0-9]+",a)}END{print a[0]}' | |
PROJECT_ID=177 | |
ACTION="projects/$PROJECT_ID/merge_requests" | |
CURRENT_BRANCH=`git branch | grep '^\*' | awk '{ print $2; }'` |
Go to Bitbucket and create a new repository (its better to have an empty repo) | |
git clone git@bitbucket.org:abc/myforkedrepo.git | |
cd myforkedrepo | |
Now add Github repo as a new remote in Bitbucket called "sync" | |
git remote add sync git@github.com:def/originalrepo.git | |
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync" | |
git remote -v |
Go to Bitbucket and create a new repository (its better to have an empty repo) | |
git clone git@bitbucket.org:abc/myforkedrepo.git | |
cd myforkedrepo | |
Now add Github repo as a new remote in Bitbucket called "sync" | |
git remote add sync git@github.com:def/originalrepo.git | |
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync" | |
git remote -v |
# Customize BASH PS1 prompt to show current GIT repository and branch. | |
# by Mike Stewart - http://MediaDoneRight.com | |
# From: http://mediadoneright.com/content/ultimate-git-ps1-bash-prompt 02-nov-2014 | |
# 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 |
foreach($level in "Machine","User") { | |
[Environment]::GetEnvironmentVariables($level).GetEnumerator() | % { | |
# For Path variables, append the new values, if they're not already in there | |
if($_.Name -match 'Path$') { | |
$_.Value = ($((Get-Content "Env:$($_.Name)") + ";$($_.Value)") -split ';' | Select -unique) -join ';' | |
} | |
$_ | |
} | Set-Content -Path { "Env:$($_.Name)" } | |
} |