Skip to content

Instantly share code, notes, and snippets.

View billerby's full-sized avatar
🏠
Working from home

Erik Billerby billerby

🏠
Working from home
  • Redpill Linpro
  • Göteborg, Sweden
  • 17:28 (UTC +02:00)
View GitHub Profile
@rinormaloku
rinormaloku / named-arguments.sh
Last active July 8, 2020 07:46
named arguments sample for bash
#!/bin/bash
#set -e
help() {
cat <<EOF
A minimalistic script to showcase named arguments in bash.
The following flags are required.
--req-arg If required arg is not specified execution is interrupted.
@sovcik
sovcik / BackupWin.ps1
Last active October 5, 2019 10:46
Script for automated delta backup to Amazon AWS S3 for Windows computers
<#
This is a simple script does delta backup of specified folders and uploads
them to Amazon S3 bucket.
Prerequisites
=============
1) installed 7zip archiver (https://www.7-zip.org/)
Installation
============
@meirbon
meirbon / Dell XPS 15 9560 Manjaro Setup instructions
Last active February 1, 2025 11:52
Small, quick guide to set up Manjaro on the XPS 15 9560
# 1. First of all of course get Manjaro:
https://manjaro.org/get-manjaro/
# I recommend using Etcher to copy the image to your USB:
https://etcher.io/
# 2. Before installing make sure:
# - Secure boot is disabled in BIOS
# - Your SSD, HDD or NVME drive is set to AHCI instead of RAID
# - Fastboot should be on Auto or minimal, but this shouldn't matter to much
@afscrome
afscrome / InstallSolr.ps1
Created November 28, 2016 23:26
Script for installing solr as a windows service
#Requires -Version 3.0
<#
.Description
Installs Apache Solr
.Example
.\ServiceInstall.ps1
Installs Apache Solr as the 'solr' service running on port 8983.
@gwillem
gwillem / ansible-bootstrap-ubuntu-16.04.yml
Created June 16, 2016 21:59
Get Ansible to work on bare Ubuntu 16.04 without python 2.7
# Add this snippet to the top of your playbook.
# It will install python2 if missing (but checks first so no expensive repeated apt updates)
# [email protected]
- hosts: all
gather_facts: False
tasks:
- name: install python 2
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
@ezeeetm
ezeeetm / backupToS3.ps1
Last active January 22, 2019 07:33
backupToS3.ps1
# config
clear
$accessKey = "your AK" # these keys are for an IAM user with read/write access only to the -dr S3 account
$secretKey = "your SK"
$bucketName = "your bucketname"
$dataVol = "D:" # omit \
$dataDirs = $null
function initializeAwsSession
@mgarces
mgarces / gist:9915424
Last active March 14, 2024 15:13
Steps I took to migrate my Alfresco 3.4d on MariaDB 5.5 to Alfresco 4.0d Postgres 9.3
# Marco Garcês - mgarces at sysadmin dot pt
# 2014
# These are the steps I took to migrate an Alfresco 3.4d community, running on top of MariaDB 5.5.35-1
# to Alfresco 4.0d on PostgreSQL 9.3.4 [CentOS release 6.5 (Final)]
#
# Prerequisites:
# You need the original MySQL Database (I used a cloned virtual machine of my original server), 2 empty Postgres databases, with # name alfresco and alfresco40, with owner alfresco, password alfresco.
# I have also used the soon-to-be opensource tool, DBTransfer (https://github.com/mgarces/dbtransfer) to move the data from
# MySQL to PostgreSQL.
#
@flox1an
flox1an / 0 Custom DocLib metadata.md
Last active August 29, 2015 13:57
Use a repository extension to add custom properties to Alfresco Share Document Library Metdata. This example adds the current users' authorities.

Repository extension to add custom DocLib meta data

Using the repository extension from the files UserInfoCustomResponse.java and fme-user-info-context.xml you can add custom doclib metadata as a json object. This data will be pulled into the browser with Share's DocLib XHR request and can be used to configure or extend the document library.

Usage as DocLib action evaluator

To use the custom data in a Share document library action evaluator you can write an evaluator in as shown in the file FmeGroupEvaluator.java

@eerohele
eerohele / mosh-cygwin.md
Last active March 3, 2024 04:20
Compiling Mosh (http://mosh.mit.edu/) under Cygwin

NOTE: You don't need to compile Mosh on Cygwin yourself anymore; just install the package with Cygwin's setup.exe.

  1. Download Cygwin.

  2. Run setup.exe and install the following packages in addition to the default ones:

    • make
    • boost
    • libncurses-devel
    • pkg-config
  • perl
public class Analytics
{
// Tracker version.
private const string Version = "4.4sa";
private const string CookieName = "__utmmobile";
// The path the cookie will be available to, edit this to use a different
// cookie path.
private const string CookiePath = "/";