Skip to content

Instantly share code, notes, and snippets.

@josefsalyer
josefsalyer / get_jenkins_plugins.groovy
Created June 5, 2017 11:51
Get a list of installed jenkins plugins from the groovy console
//Get a list of installed jenkins plugins from the groovy console
Jenkins.instance.pluginManager.plugins.each{
plugin ->
println ("${plugin.getDisplayName()} (${plugin.getShortName()}): ${plugin.getVersion()}")
}
@josefsalyer
josefsalyer / gitflow-breakdown.md
Created August 22, 2016 18:37 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
git commit --allow-empty -m "Initial commit"
git checkout -b develop master

Connect to the remote repository

#Git-flow tutorial

by Alexander Jeurissen

I created a test repository on Github to check if git-flow can aid in keeping a clean branch model. In the steps below you can see how I create a new feature and release containing our new feature.

  1. Create remote repository on Github
  2. Clone de remote repo with git clone
  3. Init git flow with defaults: git flow init -d

result:

@josefsalyer
josefsalyer / sample.c
Created February 20, 2013 02:21
time and time again...write an alarm clock!
for (int i = 0; i < 10; i++)
{
time_t now = time(NULL);
printf("The time is %ld\n", now);
sleep(2);
}
//
// main.c
// ch10
//
// Created by john salyer on 2/12/13.
// Copyright (c) 2013 john salyer. All rights reserved.
//
#include <stdio.h>
#include <time.h>
@josefsalyer
josefsalyer / loops.c
Created February 6, 2013 03:16
Remember to create a list of the steps using comments you want your program to perform so that you can keep track of your completeness as you go.
//
// main.c
// Loops
//
// Created by Curt on 2/5/13.
// Copyright (c) 2013 Curt. All rights reserved.
//
#include <stdio.h>
@josefsalyer
josefsalyer / backtomath.c
Created February 6, 2013 03:12
I split out the modf call into it's own line so you can more clearly see what it's doing - splitting the double at the decimal point.
//
// main.c
// Back to Math classes
//
// Created by Curt on 2/5/13.
// Copyright (c) 2013 Curt. All rights reserved.
//
#include <stdio.h>
#include <math.h>
@josefsalyer
josefsalyer / main.c
Created December 12, 2012 02:52
struct your stuff
//
// main.c
// StructuredObjects
//
// Created by john salyer on 12/4/12.
// Copyright (c) 2012 Josef Salyer. All rights reserved.
//
#include <stdio.h>
//#include <stdbool.h> //this is what you use if you are just using C, but we're not
@josefsalyer
josefsalyer / sum_of_numbers.md
Created November 29, 2011 19:04
Sum of numbers

Sum of Digits

Description:

Given a positive integer, find the sum of its constituent digits.

Input sample:

The first argument will be a text file containing positive integers, one per line. e.g.

@josefsalyer
josefsalyer / q.mdown
Created November 4, 2011 13:23
pangrams

Description:

The sentence 'A quick brown fox jumps over the lazy dog' contains every single letter in the alphabet. Such sentences are called pangrams. You are to write a program, which takes a sentence, and returns all the letters it is missing (which prevent it from being a pangram). You should ignore the case of the letters in sentence, and your return should be all lower case letters, in alphabetical order. You should also ignore all non US-ASCII characters.In case the input sentence is already a pangram, print out the string NULL

Input sample:

Your program should accept as its first argument a filename. This file will contain several text strings, one per line. Ignore all empty lines. eg.

A quick brown fox jumps over the lazy dog

A slow yellow fox crawls under the proactive dog