Skip to content

Instantly share code, notes, and snippets.

View ryanwoodsmall's full-sized avatar
🍞
🍞 bread 🍞 sandwich 🍞

ryan ryanwoodsmall

🍞
🍞 bread 🍞 sandwich 🍞
View GitHub Profile
@barend
barend / GitFunctions.groovy
Created April 19, 2016 13:08
Obtain a git hash in gradle, using JGit. Useful in environments where people frown on just putting a shell exec in your gradle file like so: "git log -1 --pretty=%H".execute().
// In buildSrc/src/main/groovy/
import org.eclipse.jgit.api.Git
import org.eclipse.jgit.lib.RepositoryBuilder
import org.gradle.api.Project
class GitFunctions {
public static String headCommitAndStatus(Project project) {
def repo = new RepositoryBuilder()
@kinichiro
kinichiro / 1_Hello_libtls
Last active May 6, 2025 23:23
Hello libtls - libressl libtls API sample program
Hello libtls - libressl libtls API sample program
@tomnomnom
tomnomnom / once-per-jenkins-slave.groovy
Created May 16, 2016 12:47
Run a command once on each Jenkins slave using the CloudBees Workflow / Jenkins Pipeline plugin
// The ArrayList of slaves is not serializable, so fetching them should be marked as @NonCPS so that
// no attempt is made to serialize and save the local state of the function. See here for details:
// https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md#serializing-local-variables
@NonCPS
def getSlaves() {
def slaves = []
hudson.model.Hudson.instance.slaves.each {
slaves << it.name
}
return slaves
@flibitijibibo
flibitijibibo / flibitPackaging.md
Created June 17, 2016 16:00
Hope you like reading ldd output!

A week ago I was CC'd in on a thread about Linux packaging, and how to avoid doing it the wrong way (i.e. RPM, Deb, etc.). I've always used MojoSetup and I've never forced distributions to do any additional work, but this is still a new concept to a lot of people. Additionally, Amos suggested that I expand on Itch's FNA appendix, so here's a guide on how I package my games.

This is a bit of an expansion on my MAGFest 2016 presentation, which you can find here:

http://www.flibitijibibo.com/magfest2016/

https://www.youtube.com/watch?v=B83CWUh0Log

I would recommend looking at that first! After that, read on...

@diffficult
diffficult / chromeos-crosh-custom-setup.md
Last active October 4, 2024 08:41 — forked from bramford/chromeos-crosh-custom-setup.md
Customize your ChromeOS fonts - working April 2017

Customize Chromebook Chrosh Shell Environment

Requirement: Chromebook, Common Sense, Commandline Ablity, 1 hour of time

Dear developers with a spare Chromebook lets inject a little personalization into your Crosh shell with custom fonts, the solarized theme, and extra secure shell options.

Also, keep in mind that the terms Chrosh, Chrosh Window, and Secure Shell all refer to various versions and extentions built around the ChromeOS terminal. Settings that affect the ChromeOS terminal are global.

Custom Fonts

# Pull the necessary images:
docker pull nathanleclaire/curl:latest
docker pull openjdk:8u111-jre-alpine

# Start the controller container, note that it has RW access to the Docker API socket:
docker run \
  -ti \
  --rm \
@msutter
msutter / master-node-config.groovy
Last active May 1, 2023 15:48
jenkins master node executors and restriction
#!groovy
import jenkins.model.*
import hudson.model.*
import hudson.slaves.*
import com.synopsys.arc.jenkinsci.plugins.jobrestrictions.nodes.JobRestrictionProperty;
import com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.job.RegexNameRestriction;
import com.synopsys.arc.jenkinsci.plugins.jobrestrictions.util.GroupSelector;
// Set nummber of executors
def instance = Jenkins.getInstance()
@magnetikonline
magnetikonline / README.md
Last active April 30, 2025 11:11
List all Git repository objects by size.

List all Git repository objects by size

Summary

Bash script which will:

  • Iterate all commits made within a Git repository.
@dp7k
dp7k / socket-server.py
Created February 20, 2017 21:42
A simple socket server written in Python. Edit the '_do_stuff' function in the 'Client_Thread' class to play with the received data.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import signal
import socket
import threading
class Client_Thread:
def __init__(self, c_socket, addr, debug=False):
@kwilczynski
kwilczynski / gist:36914ee29e31f7dbd27b4f6742dc96b3
Last active September 29, 2020 09:13
Amazon Elastic Network Adapter (ENA) on CentOS 6
yum -y install patch dkms kernel-devel
wget https://github.com/amzn/amzn-drivers/archive/ena_linux_1.1.3.tar.gz
tar zxvf ena_linux_1.1.3.tar.gz -C /usr/src/
mv /usr/src/amzn-drivers-ena_linux_1.1.3 /usr/src/ena-1.1.3
cat <<EOF > /usr/src/ena-1.1.3/dkms.conf
PACKAGE_NAME="ena"
PACKAGE_VERSION="1.1.3"
AUTOINSTALL="yes"