Posts by @Jasper_Holton (359)

@Jasper_Holton's profile photo

Bear in a Box - A Beautiful Orchestral Instrumental This is an awesome song I have to tag @LucasBear for (the title is inspired by him). Give it a listen, you will enjoy the blend of melodic minor chords. If you want to find more of this music, you can go to uglek.com/post/251/.


@Jasper_Holton's profile photo

Building Bridges - A Beautiful Song Written Last Year This is a blend of synthesizers, drums, piano, violin and guitar with every instrument playing beautiful chords automated for exceptional sound. It's a build up to a beautiful crescendo of piano chords followed by a catchy synthesizer riff and finished off with some synthesizer chords. I bring drums into this one later on.


@Jasper_Holton's profile photo

Road Trip - The Last Song from My Previous Album This song starts with loud piano, along with punchy guitar and drums accompanying it. It also features strings, playing some arpeggiated chords along with the piano. It's a simple instrumental that I think you will enjoy.


@Jasper_Holton's profile photo

Late Nights - Another Song from Last Year This was an experiment with a variety of instruments, beginning with some piano, and blending synthesizer as well as drums along with another piano (something I don't usually do). There aren't any more instruments in this song besides the violin, which finishes the song at the end with a nice touch. Enjoy!


@Jasper_Holton's profile photo

For You - A Song I Wrote Last Year I wrote this song last year and it wasn't sounding great at the start but I think I really worked it out towards the end, getting the right blend of synthesizer and drums together for a good finish and a real orchestral feel. I hope you enjoy this synthesizer soundscape.


@Jasper_Holton's profile photo

An Anthem of Strings and Drums with Piano This is a piece I wrote in 2019, three years ago now. That was when I was really getting into music and working really hard on making awesome instrumentals like these.


@Jasper_Holton's profile photo

An Easy Listening Song I Wrote in 2020 This is a mix of guitar, synth bass, piano, drums and synthesizer playing melodic chords and catchy rhythms in an orchestral soundscape. I hope you enjoy my music, feel free to comment on the songs you like.


@Jasper_Holton's profile photo

A JavaScript Drawing - Coffee Mug I created this simple drawing with code today as a product photo for the new buttons. It's a drawing of a coffee mug, made by using ovals and rectangles. The code that draws it is below.

function init() {
    var stage = new createjs.Stage("coffee");
    var background = new createjs.Shape();
    var yoffset = 40;
    background.graphics.beginFill("DeepSkyBlue").drawRect(0, 0, 500, 500);
    stage.addChild(background);
    var circle = new createjs.Shape();
    circle.graphics.beginFill("White").drawEllipse(10 + 300 + yoffset, 250 - 150, 120, 300);
    stage.addChild(circle);
    var circle3 = new createjs.Shape();
    circle3.graphics.beginFill("DeepSkyBlue").drawEllipse(370, 90 + yoffset, 70, 240);
    stage.addChild(circle3);
    var mug = new createjs.Shape();
    mug.graphics.beginFill("White").drawRect(100, 60 + yoffset, 300, 300);
    stage.addChild(mug);
    var circle = new createjs.Shape();
    circle.graphics.beginFill("White").drawEllipse(250 - 150, 10 + yoffset, 300, 100);
    stage.addChild(circle);
    var circle2 = new createjs.Shape();
    circle2.graphics.beginFill("Brown").drawEllipse(250 - 130, 30 + yoffset, 260, 60);
    stage.addChild(circle2);
    var circle4 = new createjs.Shape();
    circle4.graphics.beginFill("White").drawEllipse(250 - 150, 10 + 300 + yoffset, 300, 100);
    stage.addChild(circle4);
    stage.update();
}

View the photo from a post by @Jasper_Holton

@Jasper_Holton, likes this,

@Jasper_Holton's profile photo

How to Make a Dynamic Easy-Reading Theme Based on Sunrise and Sunset This code lets me automatically render pages in either light or dark mode (with light or dark styles) depending on whether the sun is up. I am querying the location and timezone info using an API. This is a great way to make a site easier on the eyes at night. A webpage with a lot of white blank space in it can be a little bit hard to use at night, so it's better to have a context processor that makes the site easier to read at night.

# app/context_processors.py
import pytz
from astral import LocationInfo
from astral.sun import sun
def context_processor(context_data)
    tz = request.user.profile.timezone # Get the timezone
    city = LocationInfo(request.user.profile.city, request.user.profile.country, tz, request.user.profile.lat, request.user.profile.lon) # Using astral to query location by city, country, timezone, latitude and longitude
    city_sun = sun(city.observer, date=datetime.now(pytz.timezone(tz))) # get 
    the city sunlight
    now_time = datetime.now(pytz.timezone(tz)).time() # Get the time now
    if now_time <= city_sun['sunrise'].astimezone(pytz.timezone(tz)).time() or now_time >= city_sun['sunset'].astimezone(pytz.timezone(tz)).time(): # If the sun is down
        context_data['darkmode'] = True # Make the page dark
    else:
        context_data['darkmode'] = False # Or otherwise make it light
    return context_data

# users/middleware.py
def simple_middleware(get_response):
    # One-time configuration and initialization.
    def middleware(request):
        User = get_user_model()
        if request.user.is_authenticated and hasattr(request.user, 'profile'):
            user = get_object_or_404(User, pk=request.user.pk)
            # Update last visit time after request finished processing.
            last_ip = request.user.profile.ip
            request.user.profile.ip = get_client_ip(request)
            if request.user.profile.ip != last_ip:
                request.user.profile.timezone = get_timezone(request.user.profile.ip)
                response = requests.get('http://https://ipinfo.io/' + request.user.profile.ip + '/json' ).json() # Get the IP info
                request.user.profile.city = response['city'] # Save it
                request.user.profile.country = response['country']
                request.user.profile.timezone = response['timezone']
                request.user.profile.lat = response['loc'].split(',')[0]
                request.user.profile.lon = response['loc'].split(',')[1]
            request.user.profile.save()
        response = get_response(request)
        return response
    return middleware


@Jasper_Holton's profile photo

You Can Now Make Money on Uglek! Uglek now supports some payment and payout features. Make money on Uglek by registering for an account and going to your profile (from the navbar). Then click the button at the bottom inviting you to accept payments, and fill out the forms. Now, other people can pay you on your profile and subscribe if they have an account on Uglek (for monthly payments). You can also post private posts to the "members" topic which can't be loaded, and the image can't be seen without a membership. Users can log in on your profile and become a member, or just give you support without requiring you to log in. Be sure to check out my shiny new buttons at uglek.com/user/Jasper_Holton/. Thanks for being here!


@Jasper_Holton, @Spinning_image, like this,

© Uglek, 2022

Terms of Use and Privacy Policy