Skip to content

Instantly share code, notes, and snippets.

View gautiermichelin's full-sized avatar

GautierMichelin gautiermichelin

View GitHub Profile
{
"intrinsic_fields" : {
"idno" : "TEST-123",
"type_id" : 43
},
"preferred_labels" : [
{
"locale" : "en_US",
"forename" : "Walter",
"middlename" : "H.",
@guiyomh
guiyomh / mysql_backup.sh
Created January 12, 2017 09:12
Mysql Backup data and schema
#!/bin/bash
# Configuration de base: datestamp e.g. YYYYMMDD
DATE=$(date +"%Y%m%d")
# Dossier où sauvegarder les backups (créez le d'abord!)
BACKUP_DIR="/backup/mysql"
@kehh
kehh / install-ca.sh
Last active May 14, 2018 19:48 — forked from anonymous/install-ca.sh
Install CollectiveAccess
#!/bin/bash
REGION="ap-southeast-2"
EFS="fs-a75dbd9e.efs.$REGION.amazonaws.com"
CMIS_ENV=cmis-uat
# Adapted from https://github.com/collectiveaccess/providence/blob/develop/Vagrantfile
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
set -e
@stefankeidel
stefankeidel / item_request.json
Created October 11, 2012 11:42
CollectiveAccess providence web service example request for new item
{
"intrinsic_fields" : {
"idno" : "TEST-123",
"type_id" : 43
},
"preferred_labels" : [
{
"locale" : "en_US",
"forename" : "Walter",
"middlename" : "H.",
@kehh
kehh / collectiveaccess_attributes_crosstab.sql
Last active December 30, 2020 10:18
CollectiveAccess crostab for attributes
-- This creates a mysql table which contains the values of
-- datamodel.conf so that we can use the values in constructing
-- queries
DROP TABLE IF EXISTS cmis_table_numbers;
CREATE TABLE cmis_table_numbers (
table_name VARCHAR(64) NOT NULL UNIQUE,
table_num INT(11) PRIMARY KEY,
@timhodson
timhodson / gist:033f635421628cc9361f
Last active September 25, 2021 04:43
Install yaz-client on a mac
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

brew install yaz

yaz-client will then be available and you can use it like this:

run the program and you get a Z> prompt.

@amityweb
amityweb / backup.sh
Last active December 2, 2021 09:41
Incremental RSync Backup with 14 Day Retention for Databases and Home Folder
#!/bin/sh
rsync="/usr/bin/rsync"
################################
# VARIABLES
################################
# General Variables
remote_server="yourserver.com"
remote_port="22"
@nl5887
nl5887 / transfer.fish
Last active March 22, 2022 09:07
Bash and zsh alias for transfer.sh. Transfers files and directories to transfer.sh.
function transfer
if test (count $argv) -eq 0
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"
return 1
end
## get temporarily filename, output is written to this file show progress can be showed
set tmpfile ( mktemp -t transferXXX )
## upload stdin or file
@marcuswestin
marcuswestin / generate-iOS-app-icons.sh
Created October 9, 2013 20:09
Generate all xcode 5 app icon sizes from one original large icon
mkdir -p generated
sips -Z 29 --out generated/iPhoneSettings-29x29.png sourceIcon.png
sips -Z 58 --out generated/iPhoneSettings-29x29@2x.png sourceIcon.png
sips -Z 80 --out generated/iPhoneSpotlight-40x40@2x.png sourceIcon.png
sips -Z 120 --out generated/iPhoneApp-60x60@2x.png sourceIcon.png
sips -Z 29 --out generated/iPadSettings-29x29.png sourceIcon.png
sips -Z 58 --out generated/iPadSettings-29x29@2x.png sourceIcon.png
sips -Z 40 --out generated/iPadSpotlight-40x40.png sourceIcon.png
@stefankeidel
stefankeidel / item_edit_request.json
Created October 19, 2012 11:52
CollectiveAccess providence web service example request for editing an existing item
{
"intrinsic_fields" : {
"idno" : "NEWTEST-456",
},
"remove_all_labels" : true,
"preferred_labels" : [
{
"locale" : "en_US",
"forename" : "Walter",
"middlename" : "H.",