Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthew DeTullio mjdetullio

  • San Francisco, CA
View GitHub Profile
@mjdetullio
mjdetullio / android-sonar.gradle
Last active Oct 30, 2019
Configuring Android project for SonarQube
View android-sonar.gradle
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
@mjdetullio
mjdetullio / verify-certs.sh
Created Nov 17, 2015
OS X: Verify all certificates in a keychain
View verify-certs.sh
#!/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
View oclint.rb
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 / gist:5145576
Last active Dec 14, 2015
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)
View gist:5145576
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?
You can’t perform that action at this time.