Skip to content

Instantly share code, notes, and snippets.

ale rimoldi aoloe

Block or report user

Report or block aoloe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@aoloe
aoloe / scribus-add-plugin-windws-alpha.md
Last active Feb 22, 2019
instructions by aiena for compiling scribus on windows
View scribus-add-plugin-windws-alpha.md

Adding a plugin to the the Visual Studio project

  • In Visual Studio create a GUID of type registry with Tools > Create GUID

  • in win32/msvc2015/Scribus.sln add after the last plugin (Project):

Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pluginname", "pluginname\pluginname.vcxproj", "{GUID-GENERATED-BY-VISUAL-STUDIO}"
    ProjectSection(ProjectDependencies) = postProject
        {B17FCD80-7978-4544-93C4-2FE1AC6FE9F3} = {B17FCD80-7978-4544-93C4-2FE1AC6FE9F3}
View collide.py
WIDTH = 640
HEIGHT = 480
BLACK = (0, 0, 0)
RED = (120, 0, 0)
box = Rect((100, 100), (100, 100), anchor=('left', 'top'))
player = Rect((300, 100), (100, 100), anchor=('left', 'top'))
def update(dt):
View assert_alter.cpp
#include <iostream>
#include <string>
#include <cassert>
std::string get_alter_typ(int alter)
{
std::string typ{}; // typ definiert
if (alter < 18) // alter vergleichen
{
View tmp-folge-der-maus.pdf
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View md-svg-png.py
#!/usr/bin/python3.6
import os
import sys
import argparse
import re
from subprocess import call
parser = argparse.ArgumentParser(description='Convert a svn referenced in a markdown line into png.')
parser.add_argument('lines', nargs='?', type=argparse.FileType('r'), default=sys.stdin)
@aoloe
aoloe / README.md
Last active Jul 10, 2018
Python classes for exercising the adapter pattern
View README.md

Adapter pattern with Python: the music player

Without modifying:

  • the Media_player_audio and Media_player_video interfaces
  • nor the Media_player_mp4 class

add an adapter that allows the music player to play the sound of an mp4 file.

View README.md

Lists sum problem

You are given two lists a and b with integers, that also can be negative, and a target sum.

Task:

  • find a function that returns true if two numbers in the list can be added to build the target sum.
@aoloe
aoloe / main.py
Created May 7, 2018
Python: Find the distance between points
View main.py
#!/usr/bin/env python3
import math
from itertools import accumulate
from functools import reduce
points = [(1,2), (2,1), (5,3)]
# points = [[1,2], [2,1], [5,3]]
print(points)
@aoloe
aoloe / CMakeLists.txt
Last active Mar 21, 2018
Refactoring AObjects
View CMakeLists.txt
CMAKE_MINIMUM_REQUIRED(VERSION 3.4)
PROJECT(align-objects)
SET(CMAKE_CXX_STANDARD 14)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
@aoloe
aoloe / CMakeLists.txt
Last active Mar 21, 2018
cycle and reverse for scribus
View CMakeLists.txt
CMAKE_MINIMUM_REQUIRED(VERSION 3.4)
PROJECT(cycle-and-reverse)
SET(CMAKE_CXX_STANDARD 14)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
You can’t perform that action at this time.