Skip to content

Instantly share code, notes, and snippets.

View samrocketman's full-sized avatar

Sam Gleske samrocketman

View GitHub Profile
@pilover100
pilover100 / auto git snapshots.md
Last active May 20, 2022 16:50
Create Endless-Sky savegame snapshots automatically using git!

Git savegame repos

Ever wanted to be able to keep track of all your savegames without a faff? Well git can be used to easily keep track of all your saves automatically so you never need to worry again!

Setup

To start, you need to initilise a git repo in your savegame folder location

you can find your savegames in these locations

@apr-1985
apr-1985 / 1-Jenkins-JCasC-Examples.md
Last active March 24, 2024 12:05
Jenkins Config As Code Examples

Jenkins JCasC Examples

Various examples of how to setup different components using JCasC

@tizki
tizki / getBuildsTimeInQueue.groovy
Created December 28, 2017 09:36
The following script prints the time each build spent in the queue
def jenkins = Jenkins.instance
def jobName = PUT_YOUR_JOB_NAME
def job = jenkins.getItem(jobName)
def builds = job.getBuilds()
builds.each { build ->
def action = build.getAction(jenkins.metrics.impl.TimeInQueueAction.class)
def timeInQ = action.getQueuingDurationMillis()
def totalTimeInQ
if (timeInQ > 60000){
@jonico
jonico / Jenkinsfile
Last active January 31, 2024 09:43
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
@samrocketman
samrocketman / libimobiledevice_ifuse_Ubuntu.md
Last active January 11, 2024 22:47
On Ubuntu 16.04, since iOS 10 update, libimobiledevice can't connect to my iPhone. This is my attempt to document a fix.

Why this document?

I upgraded my iPhone 5s to iOS 10 and could no longer retrieve photos from it. This was unacceptable for me so I worked at achieving retrieving my photos. This document is my story (on Ubuntu 16.04).

The solution is to compile libimobiledevice and ifuse from source.

Audience

Who is this guide intended for?

@samrocketman
samrocketman / KUbuntu_RAID0.md
Last active July 17, 2021 15:31
Configure KUbuntu 16.04 with RAID0

Notes for my system:

  • I couldn't get legacy boot to work. Only UEFI (using an EFI System Partition aka EPS).
  • The EPS can't be on the RAID0. You must allocate ~200 megabytes to the EPS.
  • KUbuntu installer was so buggy that I couldn't use it. Use Ubuntu to set up the system and then install kubuntu-desktop package.
  • When chrooting the EPS must be mounted on /boot/efi.
  • I recommend using Ubuntu 16.04 inside of virtualbox to create a startup boot disk on USB of Ubuntu 16.04 ISO. At first a tried using an earlier version of KUbuntu and it took a lot of trial/error to discover I shouldn't have done that.

Resources:

@stuart-warren
stuart-warren / jenkins-docker-slaves.groovy
Last active June 20, 2021 16:26
Automatically configure the docker cloud in Jenkins (/var/lib/jenkins/init.groovy.d/jenkins-docker-slaves.groovy).
#!groovy
/*
Automatically configure the docker cloud in Jenkins.
Tested with:
- {name: 'docker-plugin', ver: '0.16.0'}
*/
import jenkins.model.*;
@soifou
soifou / install-ut-goty-debian-64bits.md
Last active March 7, 2024 12:26
Install Unreal Tournament GOTY on Debian Jessie 64bits

Install Unreal Tournament GOTY on Debian 64bits

Run natively Unreal Tournament Game Of The Year (GOTY) on Debian system.

UT is not dead! The install process is a bit cumbersome but the game has been published more than 20 years ago! Please let me know how it went for you and if you have any tips, please share :)

And most important, have fun!

(Tested on Debian Bullseye 64bits)

@samrocketman
samrocketman / sslTest.java
Created November 1, 2013 18:28
A java file which will aide in testing certificate validation of a service.
//javac 1.6.0_31
/*
Compile:
javac sslTest.java
Usage (similar to telnet):
java sslTest somehost someport
e.g.
java sslTest my.gitlabhost.com 443
@samrocketman
samrocketman / update_dns_adblock_filters
Created October 4, 2013 04:00
Generate a poisoned configuration file which bind can eat for blocking domain names. The file the script eats contains one domain per line.
#!/bin/bash
#Created by Sam Gleske
#Thu Jun 7 20:43:09 EDT 2012
adblockfile="dns_ad_block_list.txt"
adblocklistdir="/media/backup/Operating Systems - Linux/Fedora/16/configs"
adblocklist="${adblocklistdir}/${adblockfile}"
backup_dir="/media/backup/Operating Systems - Linux/Fedora/16/configs/etc/named"
outfile="/etc/named/named.conf.ads.block"
echo "Creating a unique domain list."