Skip to content

Instantly share code, notes, and snippets.

View cyberplant's full-sized avatar

Luar Roji cyberplant

View GitHub Profile
@jonico
jonico / Jenkinsfile
Last active May 11, 2024 09:58
Example for a full blown Jenkins pipeline script with CodeQL analysis steps, multiple stages, Kubernetes templates, shared volumes, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, Docker containers, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, …
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
spec:
containers:
- name: mvn
image: maven:3.3.9-jdk-8
@hiway
hiway / micropython_http_bootstrap.py
Created December 13, 2016 08:27
Micropython (ESP8266): Download files from a known server to populate the filesystem with necessary files.
import ujson as json
import uos as os
import usocket as socket
# todo: https
def http_get_async(url):
_, _, host, path = url.split('/', 3)
if ':' in host:
@sivel
sivel / better-ssh-authorized-keys-management.md
Last active July 12, 2024 04:25
Better SSH Authorized Keys Management

Better SSH Authorized Keys Management

A seemingly common problem that people encounter is how to handle all of your users authorized_keys file.

People struggle over management, ensuring that users only have specific keys in the authorized_keys file or even a method for expiring keys. A centralized key management system could help provide all of this functionality with a little scripting.

One piece of functionality overlooked in OpenSSH is the AuthorizedKeysCommand configuration keyword. This configuration allows you to specify a command that will run during login to retrieve a users public key file from a remote source and perform validation just as if the authorized_keys file was local.

Here is an example directory structure for a set of users with SSH public keys that can be shared out via a web server:

@ar
ar / CBBS.H
Created July 31, 2014 23:57
CBBS.H (CS/1)
/* CBBS.H
17:45 19/09/89 APR Primer release
Version Cambio
--------------
1.00A - Primer release funcionante (se cuelga cada 2 o 3 dias)
1.00B - Se pusieron RQ y RL (Request y Release) en todas las funciones
supuestamente no reentrantes (scanf, open, close)
@juanriaza
juanriaza / currency.proto
Created January 3, 2013 18:10
simpsons tapped out hack
message Currency {
required uint64 a = 1;
required uint64 b = 2;
required uint64 c = 3;
required uint64 donuts = 4;
required uint64 e = 5;
}