Skip to content

Instantly share code, notes, and snippets.

View horaciod's full-sized avatar
💭
aprendiendo todo lo posible

Horacio Degiorgi horaciod

💭
aprendiendo todo lo posible
View GitHub Profile
@gravesm
gravesm / marc2solr.py
Created September 11, 2013 18:40
MarcXML record to Solr add doc
#!/usr/bin/env python
########################
#
# @TODO: Location field in current Solr index has both libRecord and mapRecord -
# should there be both or just libRecord?
#
########################
from lxml import etree
import sys
@horaciod
horaciod / .pdmenurc
Last active September 28, 2018 04:14
pequeño menu para los repositorios GIT
#!/usr/bin/pdmenu
#sencillo menu para usar con la utilidad pdmenu http://joeyh.name/code/pdmenu/ que permite hacer un menu en la terminal de linux.
# en ubuntu se instala con apt install pdmenu
# este archivo va en el directorio home del usuario
# version mejorada con submenus y accesos ssh usando la terminal de gnome.
#colores
color:desktop:blue:blue
color:title:blue:white
@horaciod
horaciod / enrolldecurso_a_curso.sh
Created August 8, 2019 22:24
moodle enroll all students from on course to another using moosh https://moosh-online.com/commands/
#!/bin/bash
# dos parámetros / two parameters
# ex. ./enrolldecurso_a_curso.sh --id 20 715
# $1 curso orign $2 curso destino
# ### path of the moodle root
cd /datos/webs/moodle36/html
#export curso
php /home/desarrollo/moosh/moosh.php user-list --course=$1 --id >/tmp/exportados.txt
#exit 111
@kbzone
kbzone / pdf_generator.php
Created September 6, 2021 15:40
Generador de Factura AFIP en PDF
<?php
require_once(dirname(__FILE__) . '/library/TCPDF-main/tcpdf.php');
require_once(dirname(__FILE__) . '/library/FPDI-master/src/autoload.php');
use setasign\Fpdi;
class Pdf extends Fpdi\Tcpdf\Fpdi
{
protected $tplId;
private $source_file;
@horaciod
horaciod / readme-change.md
Last active September 13, 2021 22:23
implementing Google Analytics on vufind 7.x (universal with CSP)

cambio en vufind para google analytics.

We need to change one php file module/VuFind/src/VuFind/View/Helper/Root/GoogleAnalytics.php

on function "getRawJavascript"

//new code that insert the nonce attribute on "script" tag created by s.createElement()
 if ($this-&gt;universal) {
@dweldon
dweldon / install-docker.sh
Last active April 8, 2022 11:18
Install docker CE on Linux Mint 18.3
#!/usr/bin/env bash
# https://docs.docker.com/install/linux/docker-ce/ubuntu/
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
sudo apt-get update
sudo apt-get install docker-ce
# https://docs.docker.com/compose/install/
@ignasbernotas
ignasbernotas / SetModelAttributes.php
Last active July 5, 2022 12:53
A super simple artisan command to generate setting model properties
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
class SetModelAttributes extends Command
{
@claudiodekker
claudiodekker / megapint.sh
Created June 22, 2022 22:48
Opinionated Laravel Pint alias. Prefers a repo-specific version of pint over a globally-installed one, and defaults to use the Laravel preset.
megapint() {
PINT=$([ -f "vendor/bin/pint" ] && echo "vendor/bin/pint" || echo "pint")
"$PINT" --preset laravel $@
}
@paulallies
paulallies / gist:0052fab554b14bbfa3ef
Last active November 12, 2023 23:00
Remove node_modules from git repo
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin <branch-name>
@holms
holms / gist:5005629
Last active December 21, 2023 16:10
midnight commander dark color theme
Edit mc’s ini file (either ~/.mc/ini or ~/.config/mc/ini) and look for the line [Colors]. Then, change the line base_color to this:
[Colors]
base_color=linux:normal=white,black:marked=yellow,black:input=,green:menu=black:menusel=white:menuhot=red,:menuhotsel=black,red:dfocus=white,black:dhotnormal=white,black:dhotfocus=white,black:executable=,black:directory=white,black:link=white,black:device=white,black:special=white,black:core=,black:stalelink=red,black:editnormal=white,black