Skip to content

Instantly share code, notes, and snippets.

View JrCs's full-sized avatar

Yves Blusseau JrCs

View GitHub Profile
@JrCs
JrCs / get-themes-plist
Last active August 29, 2015 14:07
Get Clover theme.plist from git repository
#!/bin/bash
export_dir="/tmp/foo"
mkdir -p $export_dir
tmp_dir=$(mktemp -d -t theme_manager)
declare -a urls=(
'https://bitbucket.org/blackosx/black_green' \
'https://bitbucket.org/blackosx/bgm256' \
@JrCs
JrCs / security.conf
Last active August 29, 2015 14:03
Fichier de sécurisation de apache
# Cette configuration permet de mieux sécurisé le serveur
# Il faut placer ce fichier dans le répertoire /etc/httpd/conf
# (et non pas /etc/httpd/conf.d) et rajouter A LA FIN du fichier
# /etc/httpd/conf/httpd.conf une ligne:
# Include conf/security.conf
# Prevents server from giving version info on error pages.
ServerSignature Off
# Prevents server from giving version info in HTTP headers
ServerTokens Prod
@JrCs
JrCs / check-svn-config-gnome-keyring.sh
Last active August 29, 2015 14:01
Check that svn is configured for using gnome-keyring
#!/usr/bin/bash
#
# This script can be called directly with:
# bash < <(curl -sS "https://gist.githubusercontent.com/JrCs/4bd6e77d25ff02e6a305/raw/check-svn-config-gnome-keyring.sh")
#
CALL=$(basename $0)
[[ -z "$HOME" ]] && HOME=~
SVN_DIR=$HOME/.subversion
SVN_CONFIG=$SVN_DIR/config
@JrCs
JrCs / createVMDKPartition.sh
Created March 29, 2014 16:35
Add a partition to VMWare Virtual Disk
#!/bin/bash
GamePartitionUUID='E7F33C26-2F83-41B2-B601-E9BF29AF9C09'
device=$(diskutil info "$GamePartitionUUID" | sed -n 's/.*Device Identifier: *//p')
if [[ -z "$device" ]]; then
echo "Impossible de déterminer la partition 'Games' avec l'UUID $GamePartitionUUID !" >&2
exit 1
fi
disk="${device%s*}"
part="${device##*s}"
@JrCs
JrCs / build_rule.txt
Last active December 11, 2015 09:08
build_rule.txt
#
# Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@JrCs
JrCs / buildgcc.sh
Last active December 11, 2015 07:18
Original buildgcc.sh
#!/bin/bash
# Script for GCC chainload in OS X made for EDKII
#
# Primary use is for creating better crosscompile support than
# mingw-gcc-build.py that is found in BaseTools/gcc/
#
# With this we can use Native GCC chainload for EDKII
# development
#
@JrCs
JrCs / create-clone-tags.sh
Created August 17, 2012 23:59
Script to help to clone annotated tags
#!/bin/bash
# This script clone a tag and add a v prefix to it
# All the tags are commit with the same author/email
set -u
# To force author and email we need to change the local configuration
git config user.name kapeka
git config user.email kapeka@users.sourceforge.net
@JrCs
JrCs / rpmforge_installeur.sh
Created August 5, 2012 07:43
Script pour installer les repos RPMForge sur CentOS
#!/bin/bash
set -u
rpmforge_rpmfile=$(mktemp -u --suffix=.rpm)
_clean_exit()
{
[ -f "$rpmforge_rpmfile" ] && rm -f "$rpmforge_rpmfile"
}