Skip to content

Instantly share code, notes, and snippets.

View josefsalyer's full-sized avatar

Josef Salyer josefsalyer

  • 11:37 (UTC -04:00)
View GitHub Profile
@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>
//
// 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 / 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);
}

#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 / 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

@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 / SSLPoke.java
Created June 5, 2017 17:21 — forked from 4ndrej/SSLPoke.java
Test of java SSL / keystore / cert setup. Check the commet #1 for howto.
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import java.io.*;
/** Establish a SSL connection to a host and port, writes a byte and
* prints the response. See
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services
*/
public class SSLPoke {
public static void main(String[] args) {
@josefsalyer
josefsalyer / 02-Jenkinsfile
Created July 13, 2017 18:37 — forked from abtris/02-Jenkinsfile
Jenkinsfile - imperative style vs declarative style
pipeline {
agent any
environment {
PACKAGE="github.com/abtris/bee"
GOPATH="/Users/abtris/go"
GOROOT="/usr/local/opt/go/libexec"
}
stages {
stage('Preparation') {
steps {
@josefsalyer
josefsalyer / README.md
Created August 14, 2017 17:46 — forked from mosquito/README.md
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/[email protected]

[Unit]
Description=%i service with docker compose
Requires=docker.service
After=docker.service
#!/usr/bin/env bash
encode()
{
local string=$1
local strlen=${#string}
for (( pos=0 ; pos<strlen ; pos++ )); do
c=${string:$pos:1}