Skip to content

Instantly share code, notes, and snippets.

View armandomiani's full-sized avatar
🇺🇦
#standwithukraine

Armando Miani armandomiani

🇺🇦
#standwithukraine
View GitHub Profile
@armandomiani
armandomiani / tests.sh
Created November 13, 2019 06:13
MediaWiki Functional Tests
apt-get install -y jq
https://gist.github.com/subfuzion/08c5d85437d5d4f00e58
# Test 301 and redirection
curl -L -I -s http://localhost | grep -E "^HTTP/1.1 301|^Location: .*/Main_Page.*$"
# api test
@armandomiani
armandomiani / update_supervisor_config.sh
Created October 10, 2019 10:59
# Responsible for updating a supervisor configuration
#!/bin/bash
# Responsible for updating a supervisor configuration
# Usage: update_supervisor_config [service] [config] [new_value]
function update_supervisor_config() {
local INPUT_FILE="${SUPERVISOR_CONFIG}"
local SERVICE=$1
local CONFIG=$2
local NEW_VALUE=$3
local TMP_FILE="/tmp/supervisor.conf"
<!-- start Mixpanel --><script type="text/javascript">(function(e,a){if(!a.__SV){var b=window;try{var c,l,i,j=b.location,g=j.hash;c=function(a,b){return(l=a.match(RegExp(b+"=([^&]*)")))?l[1]:null};g&&c(g,"state")&&(i=JSON.parse(decodeURIComponent(c(g,"state"))),"mpeditor"===i.action&&(b.sessionStorage.setItem("_mpcehash",g),history.replaceState(i.desiredHash||"",e.title,j.pathname+j.search)))}catch(m){}var k,h;window.mixpanel=a;a._i=[];a.init=function(b,c,f){function e(b,a){var c=a.split(".");2==c.length&&(b=b[c[0]],a=c[1]);b[a]=function(){b.push([a].concat(Array.prototype.slice.call(arguments,
0)))}}var d=a;"undefined"!==typeof f?d=a[f]=[]:f="mixpanel";d.people=d.people||[];d.toString=function(b){var a="mixpanel";"mixpanel"!==f&&(a+="."+f);b||(a+=" (stub)");return a};d.people.toString=function(){return d.toString(1)+".people (stub)"};k="disable time_event track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config reset people.set people.set_once people.i
@armandomiani
armandomiani / gulpfile.js
Created November 4, 2015 11:42
gulpfile example
var gulp = require('gulp');
var replace = require('gulp-replace');
var shell = require('gulp-shell');
var argv = require('yargs').argv;
var yaml = require('js-yaml');
var fs = require('fs');
var run = require('gulp-run');
var runSequence = require('gulp-run-sequence');
var currentEnvironment = '';
var createJob = function(callback) {
var url = get_service_url('', '/rest/v1/job/create');
var params = {
'contact_email': 'armando.miani@i-value.com.br',
'contact_name': 'Armando Miani',
'contact_phone': '19999385915',
'address': 'Alameda Franca, 1222, Jardim Paulista, São Paulo',
'description': 'I want nice pictures or else I will not pay.',
@armandomiani
armandomiani / gist:6425907
Created September 3, 2013 16:04
Enable WCF traces
<system.diagnostics>
<sources>
<source name="System.ServiceModel"
switchValue="Information, ActivityTracing"
propagateActivity="true">
<listeners>
<add name="traceListener"
type="System.Diagnostics.XmlWriterTraceListener"
initializeData= "S:\Services\gaiaservices.canaldoimovel.com.br\logs\Traces.svclog" />
</listeners>