Skip to content

Instantly share code, notes, and snippets.

@lasconic
lasconic / gist:5965542
Last active July 30, 2022 06:10
replace double slashes by simple slash in library paths before running macdeployqt
BIN_FILE=YOURBINARY
for P in `otool -L $BIN_FILE | awk '{print $1}'`
do
if [[ "$P" == *//* ]]
then
PSLASH=$(echo $P | sed 's,//,/,g')
install_name_tool -change $P $PSLASH $BIN_FILE
fi
done
@lasconic
lasconic / aws
Created February 19, 2014 10:05 — forked from QaDeS/aws
IAMUSERID %{NUMBER:iam_user_id}
IAMUSERNAME [a-zA-Z0-9._-]+
IAMUSER arn:aws:iam::%{IAMUSERID}:user/%{IAMUSERNAME:iam_user_name}
S3TYPE [a-zA-z_]+
S3OP [a-zA-z]+
S3SOAPOPERATION (?:SOAP\.%{S3OP})
S3RESTOPERATION (?:REST\.%{S3OP}(\.%{S3TYPE})?)
S3WEBSITEOPERATION (?:WEBSITE\.%{S3OP}\.%{S3TYPE})
S3OPERATION (?:%{S3SOAPOPERATION}|%{S3RESTOPERATION}|%{S3WEBSITEOPERATION})
template count
m 38
w 4
l 2
lb 1
{
"hourly":[
{
"time":"00:00",
"conso":111
},
{
"time":"00:30",
"conso":113
},
@lasconic
lasconic / uncrustify.cfg
Created June 29, 2015 16:58
Uncrustify configuration file for MuseScore. To be used with https://github.com/lasconic/uncrustify/tree/indent_param
# Uncrustify 0.61
#
# General options
#
# The type of line endings
newlines = auto # auto/lf/crlf/cr
# The original size of tabs in the input
@lasconic
lasconic / trumpetfingeringfr.js
Created May 8, 2012 15:58
Trumpet fingering plugin for MuseScore with french note names
//=============================================================================
// MuseScore
//
// Note names and fingerings for Trumpet Bb
// changable for other Brass
//
// Contribution Artur Vilá Canal
// Copyright (c) 2011 Karl Gerhards, (C)2008 Werner Schweer and others
//
// This program is free software; you can redistribute it and/or modify
@lasconic
lasconic / generateTs.py
Created December 21, 2018 16:02
generate .h file for MuseScore's tours
#!/usr/bin/env python
import os
import xml.etree.ElementTree as ET
def addMessage(f, text, comment=''):
text = text.replace('"', r'\"')
if (comment):
f.write('QT_TRANSLATE_NOOP3("TourXML", "' + text.encode('utf8') + '", "' + comment.encode('utf8') + '"),\n')
(function() {
function readAll() {
const links = document.querySelectorAll("div.forum__topic-status--new + div.forum__title div.forum__name a")
for (const a of links) {
console.log(a.href)
var sArray = a.href.split("/")
var nid = sArray[sArray.length - 1];
@lasconic
lasconic / randomvelocity.qml
Last active September 25, 2018 08:16
This plugin for MuseScore 2 randomizes the velocity of notes between minRandom and maxRandom
//=============================================================================
// MuseScore
// Music Composition & Notation
//
// Copyright (C) 2018 Nicolas Froment
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2
// as published by the Free Software Foundation and appearing in
// the file LICENCE.GPL
@lasconic
lasconic / gist:4234030
Created December 7, 2012 15:39
Extract lyrics from score - MuseScore 2.0
import QtQuick 1.0
import MuseScore 1.0
MuseScore {
menuPath: "Plugins.pluginName"
onRun: {
var cursor = curScore.newCursor();
var sArray= new Array();
for (var track = 0; track < curScore.ntracks; ++track) {
cursor.track = track;