Skip to content

Instantly share code, notes, and snippets.

View freephile's full-sized avatar

Greg Rundlett freephile

View GitHub Profile
I forked the drupal project from git://github.com/mikl/drupal.git (my "origin") so that I could start with official upstream drupal sources. I then created my own private remote repository that I can push to (iic-drupal), and have made a number of commits (using a different computer). Now I'm on a machine where I want to pull from iic-drupal, but if I do 'git pull' it complains (see below) This gist describes how I fixed my configuration, and clears up for me how in a DISTRIBUTED VCS, you need to tell the system which local branch you are working with, and equally important, which remote AND branch on that remote you want to pull code from.
$ cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
@freephile
freephile / svn-lint.php
Last active December 16, 2015 09:39 — forked from omnicolor/svn-lint.php
#!/usr/local/bin/php
<?php
/**
* Pre-commit Subversion script.
*
* @author Greg Rundlett <info@eQuality-Tech.com>
*/
/**
@freephile
freephile / myStackScript.sh
Created April 3, 2015 19:25
LAMP+ stack script for Linode
#!/bin/bash
set -e
source <ssinclude StackScriptID="1">
##################
# IMPORTANT
# Some functions in the script rely on other functions being used first
# (i.e. munin expects mysql to be installed)
##################
@freephile
freephile / install_wiki.yml
Created September 1, 2016 21:04
include plays in ansible playbook
---
# You can't include plays in plays
# This will FAIL a syntax check / will not execute
- hosts: mw_hosts
name: Install sources, extensions and skins
tasks:
- name: Do Nothing At All
debug: msg="I'm a task"
- include: install_mediawiki.yml
- include: install_extensions.yml
@freephile
freephile / composer.json
Created December 2, 2016 13:02
MediaWiki REL1_26 composer.json v composer.lock
{
"name": "mediawiki/core",
"description": "Free software wiki application developed by the Wikimedia Foundation and others",
"keywords": ["mediawiki", "wiki"],
"homepage": "https://www.mediawiki.org/",
"authors": [
{
"name": "MediaWiki Community",
"homepage": "https://www.mediawiki.org/wiki/Special:Version/Credits"
}
@freephile
freephile / .gitignore
Last active January 3, 2021 14:59 — forked from zpetr/.gitignore
a good .gitignore
# Compiled source #
###################
*.com
*.class
*.dll
*.ear
*.exe
*.o
*.so
@freephile
freephile / fix.perms.sh
Created September 16, 2017 04:04
Fix any permission problems in the upload filesystem
cat ./src/scripts/fix.perms.sh.j2
#!/bin/bash
# This script will fix all permissions in the uploads directory
# Since thumbs are included, this will allow missing thumbs to be created
# by RunJobs.php
uploads= {{ m_uploads }} # e.g. /opt/data-meza/uploads-gluster/
time sudo chown -R apache:apache "$uploads"
time sudo find "$uploads" -type d -exec sudo chmod u=rwx,g+rwxs,o=rx {} \;
@freephile
freephile / %etc%cron.d%spl
Created October 2, 2017 20:24
slicer.org scripts
# Unlike any other crontab you don't have to run the 'crontab'
# command to install the new version when you edit this file
# and other files in /etc/cron.d
#
# These files also have username fields,
# which user crontabs do not - making this more flexible as a solution to put
# all your crons in one place.
#
# System cron is in /etc/crontab and you generally don't want to edit that file
@freephile
freephile / CentralAuthSettings.php
Last active October 17, 2017 02:18
CentralAuth config
<?php
# CentralAuth
wfLoadExtension( 'CentralAuth' );
if ( $espEnv == 'stage' ) {
$espConfSuffixes = array( 'wiki' );
$espCentralAuthAutoLoginWikis = array(
'devlol.esportspedia.com' => 'lol_wiki',
'devcod.esportspedia.com' => 'cod_wiki',
@freephile
freephile / backtrace1
Created May 17, 2019 10:12
NameTableAccessException
MediaWiki internal error.
Original exception: [ac7a70055b293fb9ad91406f] /wiki/it/Pagina_principale?requestDebug=true MediaWiki\Storage\NameTableAccessException from line 42 of /opt/htdocs/wiki/mediawiki/includes/Storage/NameTableAccessException.php: Failed to access name from slot_roles using id = 1
Backtrace:
#0 /opt/htdocs/wiki/mediawiki/includes/Storage/NameTableStore.php(308): MediaWiki\Storage\NameTableAccessException::newFromDetails(string, string, integer)
#1 /opt/htdocs/wiki/mediawiki/includes/Revision/RevisionStore.php(1624): MediaWiki\Storage\NameTableStore->getName(integer)
#2 /opt/htdocs/wiki/mediawiki/includes/Revision/RevisionStore.php(1671): MediaWiki\Revision\RevisionStore->loadSlotRecords(string, integer)
#3 [internal function]: MediaWiki\Revision\RevisionStore->MediaWiki\Revision\{closure}()
#4 /opt/htdocs/wiki/mediawiki/includes/Revision/RevisionSlots.php(165): call_user_func(Closure)
#5 /opt/htdocs/wiki/mediawiki/includes/Revision/RevisionSlots.php(107): MediaWiki\Revision\RevisionSlots-