Skip to content

Instantly share code, notes, and snippets.

View okere-prince's full-sized avatar

okere-prince

  • Paris
View GitHub Profile
@okere-prince
okere-prince / sftp.yaml
Created May 3, 2022 18:11 — forked from jujhars13/sftp.yaml
kubernetes pod example for atmoz/sftp
apiVersion: v1
kind: Namespace
metadata:
name: sftp
---
kind: Service
apiVersion: v1
metadata:
@okere-prince
okere-prince / Jenkinsfile
Created April 5, 2022 22:01 — forked from JCotton1123/Jenkinsfile
Sample Jenkinsfile for Python project
pipeline {
options {
buildDiscarder(logRotator(numToKeepStr: '10')) // Retain history on the last 10 builds
ansiColor('xterm') // Enable colors in terminal
timestamps() // Append timestamps to each line
timeout(time: 20, unit: 'MINUTES') // Set a timeout on the total execution time of the job
}
agent {
// Run this job within a Docker container built using Dockerfile.build
// contained within your projects repository. This image should include
@okere-prince
okere-prince / README.md
Created October 17, 2021 12:35 — forked from obfusk/README.md
building chromium (on ubuntu 12.04) w/ extra ffmpeg codecs

VM

$ mkdir -p ~/tmp/build/chromium-vagrant && cd ~/tmp/build/chromium-vagrant
$ vim Vagrantfile

$ vagrant up && vagrant halt
# use virtualbox to add 20GB swap (/dev/sdb)

$ vagrant up && vagrant ssh
@okere-prince
okere-prince / golang_job_queue.md
Created May 11, 2021 10:21 — forked from harlow/golang_job_queue.md
Job queues in Golang
@okere-prince
okere-prince / setup-users.groovy
Created May 6, 2021 19:50 — forked from wiz4host/setup-users.groovy
jenkins init.groovy.d script for configuring users
import jenkins.*
import hudson.*
import com.cloudbees.plugins.credentials.*
import com.cloudbees.plugins.credentials.common.*
import com.cloudbees.plugins.credentials.domains.*
import com.cloudbees.jenkins.plugins.sshcredentials.impl.*
import hudson.plugins.sshslaves.*;
import hudson.model.*
import jenkins.model.*
import hudson.security.*

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@okere-prince
okere-prince / deployment.yml
Created March 9, 2021 13:53 — forked from troyharvey/deployment.yml
Using Kubernetes envFrom for environment variables
# Use envFrom to load Secrets and ConfigMaps into environment variables
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: mans-not-hot
labels:
app: mans-not-hot
spec:
replicas: 1
@okere-prince
okere-prince / parhttp.py
Created April 9, 2020 09:31 — forked from hoffrocket/parhttp.py
Python parallel http requests using multiprocessing
#!/usr/bin/env python
from multiprocessing import Process, Pool
import time
import urllib2
def millis():
return int(round(time.time() * 1000))
def http_get(url):
@okere-prince
okere-prince / kubectl_ubuntu_wsl.sh
Created March 13, 2020 16:37 — forked from cmendible/kubectl_ubuntu_wsl.sh
Install kubectl on ubuntu (WSL) and use kubectl config from Windows
#!/bin/bash
# Receives your Windows username as only parameter.
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.16.0/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
windowsUser=$1