Skip to content

Instantly share code, notes, and snippets.

View mjdetullio's full-sized avatar

Matthew DeTullio mjdetullio

  • San Francisco, CA
View GitHub Profile
@mjdetullio
mjdetullio / gist:5145576
Last active December 14, 2015 20:39
GitLab 4.2: Convert public (no auth) HTTP clone projects into internally public projects (auth required) with Reporter access. I am not liable for any effects this may have on your GitLab instance(s)
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb
index 400e44e..7c74dcb 100644
--- a/app/controllers/admin/users_controller.rb
+++ b/app/controllers/admin/users_controller.rb
@@ -10,7 +10,7 @@ class Admin::UsersController < Admin::ApplicationController
def show
@projects = Project.scoped
- @projects = @projects.without_user(admin_user) if admin_user.authorized_projects.present?
+ @projects = @projects.without_user(admin_user) if admin_user.joined_projects.present?
require 'formula'
class Oclint < Formula
homepage 'http://oclint.org'
url 'http://archives.oclint.org/nightly/oclint-0.9.dev.d18b401-x86_64-darwin-14.5.0.tar.gz'
version '0.9.dev.d18b401'
sha1 '357182ca204e5740af2b6250911686a96fb8045a'
devel do
url 'http://archives.oclint.org/nightly/oclint-0.9.dev.d18b401-x86_64-darwin-14.5.0.tar.gz'
@mjdetullio
mjdetullio / verify-certs.sh
Created November 17, 2015 19:13
OS X: Verify all certificates in a keychain
#!/bin/bash -xe
KEYCHAIN="~/Library/Keychains/login.keychain"
TMPFILE="$(mktemp)"
security find-certificate -a "${KEYCHAIN}" | grep '"alis"<blob>=' | sed -e 's/^ "alis"<blob>="\(.*\)"$/\1/' | while read -r CERT_NAME
do
security find-certificate -c "${CERT_NAME}" -p "${KEYCHAIN}" > "${TMPFILE}"
security verify-cert -c "${TMPFILE}" -k "${KEYCHAIN}"
done
@mjdetullio
mjdetullio / android-sonar.gradle
Last active August 27, 2020 19:53
Configuring Android project for SonarQube
import com.android.build.gradle.AppPlugin
task consolidateJunitXml {
description 'Copies JUnit XML reports into a single directory so SonarQube can import them all'
doLast {
def dest = file("${buildDir}/allJunit")
delete dest
copy {
from "${buildDir}/test-results/debug"
into dest