Skip to content

Instantly share code, notes, and snippets.

View kekru's full-sized avatar

Kevin Krummenauer kekru

View GitHub Profile
@olih
olih / curl-ca.md
Created June 23, 2015 10:57
Curl with custom CA certificates

Using curl with custom CA certificates

This document describes how to use curl with both custom and official CA SSL certificates.

Prerequisite

You would need first to install curl , see http://curl.haxx.se/docs/install.html. Using a package manager such as yum, brew, ... for your platform should be the easiest though.

Example for Mac OS:

@ivanov-alex
ivanov-alex / gist:e0cc14d3dc6fc1520283
Last active November 15, 2022 20:22
Extending Enum for UT using Mockito
/////////// changes for pom.xml
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>1.6.2</version>
@leedm777
leedm777 / AnsibleVaultDiff.md
Last active January 2, 2024 08:50
Ansible vault diff in Git

Normally, when you diff an [Ansible vault][], all you see is gibberish.

$ git diff -- group_vars/all/vault.yml
diff --git a/group_vars/all/vault.yml b/group_vars/all/vault.yml
index 245ccf4..90bf9ee 100644
--- a/group_vars/all/vault.yml
+++ b/group_vars/all/vault.yml
@@ -1,111 +1,111 @@
 $ANSIBLE_VAULT;1.1;AES256
@julz
julz / main.go
Created November 20, 2015 12:39
containersched minicontainer
package main
import (
"fmt"
"os"
"os/exec"
"syscall"
)
func main() {
@jitpack-io
jitpack-io / init.gradle
Created December 7, 2015 13:29
JitPack repository in Gradle
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.artifacts.dsl.RepositoryHandler
apply plugin:JitPackRepositoryPlugin
class JitPackRepositoryPlugin implements Plugin<Gradle> {
void apply(Gradle gradle) {
@yuki-takei
yuki-takei / keybindings.json
Last active August 22, 2021 06:23 — forked from bpedman/keybindings.json
Visual Studio Code - Eclipse Keybindings (Win, Linux)
[
{
"key": "ctrl+d",
"command": "editor.action.cutLines",
"when": "editorTextFocus"
},
{
"key": "ctrl+o",
"command": "workbench.action.gotoSymbol"
},
@solidnerd
solidnerd / GitlabContainerRegistrySetup.md
Last active February 21, 2024 14:48
GitLab Container Registry Setup

Settting up a Container Registry with docker-gitlab

This should be used for new users to getting started with the container registry feature on docker-gitlab.

Requirements

@ericclemmons
ericclemmons / example.md
Last active April 24, 2024 18:09
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 Summary Goes Here
@noahcoad
noahcoad / yaml2json.py
Last active December 27, 2019 22:46
Python to Convert yaml to json
# convert yaml to json
# pip3 install pyyaml
# http://pyyaml.org/wiki/PyYAMLDocumentation
# py3 yaml2json.py < ~/code/manpow/homeland/heartland/puphpet/config.yaml
# gist https://gist.github.com/noahcoad/51934724e0896184a2340217b383af73
import yaml, json, sys
sys.stdout.write(json.dumps(yaml.load(sys.stdin), sort_keys=True, indent=2))
@razbomi
razbomi / gulpfile.js
Created November 16, 2016 23:19
Gulp pipe function
'use strict';
var gulp = require('gulp');
var through = require('through2');
// https://gulp.readme.io/docs
gulp.task('default', () => {
gulp.src('src/**/*')
.pipe(pipeFunction())
.pipe(gulp.dest('dist'))