Skip to content

Instantly share code, notes, and snippets.

View dwamara's full-sized avatar

Daniel Wamara dwamara

View GitHub Profile
@dwamara
dwamara / gitflow-breakdown.md
Created August 22, 2017 20:56 — 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

@dwamara
dwamara / hubflow_workflow
Created August 25, 2017 06:06 — forked from bevanhunt/hubflow_workflow
Hubflow Workflow
Git Hubflow Workflow:
Sync Branch:
git hf update - this will update master and develop and sync remote branches with local ones (be sure not to put commits into develop or master as it will push these up)
git hf push - this will push your commits in your local branch to the matching remote branch
git hf pull - this will pull the remote commits into your local branch (don't use if the remote branch has been rebased - use git pull origin "your-branch" instead)
Feature Branch:
gif hf feature start "my-feature" - this will create a feature branch on origin and local will be based off the latest develop branch (make sure to git hf update before or you will get an error if local develop and remote develop have divereged)
git hf feature finish "my-feature" - this will delete the local and remote branches (only do this after a PR has been merged)
@dwamara
dwamara / docker_cleanup.sh
Created November 13, 2018 22:33
Docker for Mac cleanup
#!/bin/bash
# Copyright 2017 Théo Chamley
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
# to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or
# substantial portions of the Software.
@dwamara
dwamara / minikube-install.sh
Created December 6, 2018 16:08 — forked from massenz/minikube-install.sh
Kubernetes Minikube install on MacOS
#!/bin/bash
#
# Installs minikube on MacOS
# See: https://github.com/kubernetes/minikube/releases
declare -r VERSION=${1:-}
if [[ -z ${VERSION} ]]; then
echo "Please specify a version"
exit 1
@dwamara
dwamara / is24_quarter_geocode.sql
Created January 13, 2019 14:26
Mapping between PLZ and GEOCODE for Immobilienscout24
This file has been truncated, but you can view the full file.
-- Adminer 4.6.3 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP DATABASE IF EXISTS `is24_quarter_geocode`;
CREATE DATABASE `is24_quarter_geocode` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `is24_quarter_geocode`;
-- Adminer 4.1.0 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `city`;
CREATE TABLE `city` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
@dwamara
dwamara / nexus3-clean-timestamped-snapshots.groovy
Last active December 8, 2020 08:10
Due to the requirement from Maven to not have unique versions of SNAPSHOTS, even when a policy to clean the SNAPSHOTS is specified in Nexus 3, SNAPSHOTS that are not cleaned still contain several versions of the SNAPSHOTS artefacts timestamped. This script allows to delete the timestamped SNAPSHOTS and to keep a certain specified amount of them
import groovy.json.JsonSlurper
import groovy.transform.Field
import static groovy.time.TimeCategory.minus
import static javax.xml.bind.DatatypeConverter.printBase64Binary
@Field def params = [:]
@Field def nexus = [:]
@Field def artifactsToVersion = [:]
@Field def was_at_least_one_element_delete = false
[
{
"casesCount": 1,
"citizenship": "French Southern and Antarctic Lands"
},
{
"casesCount": 1,
"citizenship": "Seychelles"
},
{
@dwamara
dwamara / WebStorm_DataGrip_IntelliJIdea
Created October 10, 2022 04:10 — forked from ShawNexT/WebStorm_DataGrip_IntelliJIdea
WebStorm & DataGrip & IntelliJIdea renew license
cd ~/.WebStorm*
rm config/eval/WebStorm*evaluation.key
rm config/options/other.xml
cd ~/.java/.userPrefs/jetbrains
rm -rf webstorm
cd ~/.DataGrip*
rm config/eval/DataGrip*evaluation.key
rm config/options/other.xml