Skip to content

Instantly share code, notes, and snippets.

View mrjcleaver's full-sized avatar

Martin Cleaver mrjcleaver

  • Aparine
  • Guelph, ON, Canada
View GitHub Profile
@sr75
sr75 / wget-jdk-oracle-install-example.txt
Last active March 16, 2023 11:28
wget command to install Oracle JAVA JDK from stupid oracle website for centos and ubuntu
http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6
# rpm
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm" \
-O jdk-7-linux-x64.rpm
# ubuntu
@akesterson
akesterson / gist:11391984
Created April 29, 2014 06:22
Why I switched from bamboo to jenkins
TL;DR - It was proving to be more buildsystem than I needed,
and I had found that there were other buildsystems that met my needs
that I felt were lighter and more nimble. It's still a fine product
that I continue to recommend to this day, I just no longer see it as
"The One True Way".
=========================
1: Bamboo was consuming a significant amount of system resources,
@charlesjohnson
charlesjohnson / gemrc.erb
Last active August 29, 2015 14:05
Use a .gemrc file with Omnibus chef-client
:sources:
- http://<%= node['gem_file']['host'] %>:<%= node['gem_file']['port'] %>/
@davidgiesberg
davidgiesberg / README.md
Created September 30, 2014 02:30
Shellshock Chef Updates for Ubuntu

We added these bits to one of our base cookbooks that gets applied to every node.

Because apt doesn't allow you to specify a minimum version for a package to be installed, I had to build an approximation of that logic in this recipe. Basically, what we do is check for a bash package version that is less than what is specified in the node attributes for that platform. If and only if the installed version is less than the min_pkg_ver attribute, we notify apt_package[bash] to run the :upgrade action. That ought to prevent us from updating bash unnecessarily, but also ensuring that we are never running an unpatched bash.

(Also, handy thing to note is the execute[apt-get update] - that's using the apt cookbook to force an apt-get update to run immediately. If you don't do that, bash won't update until apt has updated AND this chef recipe runs again.

package com.acme.scriptrunner.test
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.IssueInputParametersImpl
import com.atlassian.jira.project.AssigneeTypes
import com.onresolve.jira.groovy.GroovyFunctionPlugin
import com.onresolve.scriptrunner.canned.jira.utils.CustomScriptDelegate
import com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.CustomScriptFunction
import com.onresolve.scriptrunner.test.AbstractWorkflowSpecification
import com.opensymphony.workflow.loader.ActionDescriptor
@bjacobowski
bjacobowski / DevBuild.txt
Last active November 24, 2023 17:43
Boxstarter
try {
Install-WindowsUpdate -AcceptEula
Update-ExecutionPolicy Unrestricted
Move-LibraryDirectory "Personal" "$env:UserProfile\google drive\documents"
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Set-TaskbarSmall
Enable-RemoteDesktop
#utilities
cinst 7zip
@ttscoff
ttscoff / Automator Workflow.sublime-build
Last active October 22, 2018 21:38
A script to take input on STDIN and update a specified Automator (OS X) workflow action with it
{
"shell_cmd": ["cat", "$file", "|", "/usr/bin/ruby", "/Users/ttscoff/scripts/update_workflow.rb"]
}
@sczizzo
sczizzo / report_log.rb
Created February 7, 2015 23:49
Log Handler
require 'chef/handler'
require 'chef/log'
require 'json'
# Based on https://docs.chef.io/handlers.html#cookbook-versions
# and http://dev.nuclearrooster.com/2011/05/10/chef-notifying-and-logging-updated-resources
module Handlers
@tobiasmh
tobiasmh / gist:3e5aa4f7a37d9e834647
Last active August 21, 2018 18:31
Migrate a Confluence users activity to another user
-- WARNING
-- WARNING THIS IS PROBABLY INCOMPLETE AND MAY BREAK CONFLUENCE. USE AT YOUR OWN RISK
-- WARNING
-- Migrate a Confluence users activity to another user
SELECT * FROM user_mapping WHERE lower_username='old_username' OR lower_username='new_username';
+----------------------------------+------------------+----------------+
| user_key | username | lower_username |
+----------------------------------+------------------+----------------+
| ff8080814094fe77014094ffd60c0115 | old_username | old_username |
import sys
import openai
import json
import pandas as pd
from Bio import Entrez
from datetime import datetime
from PyQt6 import QtWidgets, QtGui
from PyQt6.QtCore import Qt
# Replace with your own ChatGPT API key