Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block blabadi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:e33b4d19e1b19f2ca19c17df7a3cc2ff
curl -X POST https://jenkins-url/pipeline-model-converter/validate -H 'Authorization: Basic <your username&pass base64enc>' -F "jenkinsfile=<Jenkinsfile.groovy"
blabadi /
Last active Jun 19, 2019
setup kubernetes vault in
blabadi /
Created Jun 17, 2019 — forked from jogy/
Installing a single node Kubernetes on Ubuntu with kubeadm
# 1) Install Kubernetes on a Ubuntu machine
sudo -i
curl -s | apt-key add -
echo 'deb kubernetes-xenial main' >> /etc/apt/sources.list.d/kubernetes.list
apt update && apt install -y kubelet kubeadm kubectl
sudo systemctl enable docker.service
kubeadm init --pod-network-cidr= # Flannel pod network, see below
# 2) Prepare kubectl
blabadi / javaPropsToK8sEnvArray.js
Last active May 10, 2019
a script to convert java properties into env vars instead of manually typing them, it takes into account arrays in keys. the output format is specifically useful for kubernetes yaml env object
View javaPropsToK8sEnvArray.js
const convertJavaPropertiesToEnvVars = function(configs) {
const configLines = configs.split('\n');
let out = ''
for (let idx in configLines) {
const line = configLines[idx]
const key = line.split('=')[0].toUpperCase()
.replace(/\[/g, '.')
.replace(/\]/g, '')
.replace(/\./g, '_')
const value = line.split('=')[1]
View black_slack.css
body { background: #222; color: #e6e6e6; }
a { color: #949494; }
a:link, a:visited { color: #949494; }
a:hover, a:active, a:focus { color: #c7c7c7; }
hr { border-bottom: 1px solid #424242; border-top: 1px solid #222; }
View gensim.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View reducer.js
import {SEARCH_FOOD, RECEIVE_SEARCH_FOOD_RESULTS} from "../actions/searchFoodActions";
const searchFoodResult = (state = { isFetching: false, term: '', results: [] }, action) => {
switch (action.type) {
return Object.assign({}, state, {
isFetching: true,
term: action.term
View searchFoodActions.js
import foodRepo from '../repos/FoodRepo';
export const SEARCH_FOOD = 'SEARCH_FOOD';
export const fetchFood = (term) => {
return (dispatch) => {
return foodRepo.findFood(term)
.then(foods => {
View index.js
import { combineReducers } from 'redux'
import searchFoodResult from './search'
const nutracker = combineReducers({
export default nutracker
View SearchFood.js
import SearchBox from '../presentational/search/SearchBox';
import {searchFood} from '../actions'
import {connect} from 'react-redux';
const mapDispatchToProps = dispatch => ({
onTermChange: term => dispatch(searchFood(term))
const mapStateToProps = (state) => {
return {
You can’t perform that action at this time.