Showing posts with label formula. Show all posts
Showing posts with label formula. Show all posts

Apr 22, 2024

What is Nostr?

Nostr itself isn't an app or website, but a protocol.

Think of it as a set of rules that allows different apps to communicate with each other in a decentralized way. It's designed for social networking and focuses on privacy and censorship resistance.

Nostter.app is a website that uses the Nostr protocol. From this website you can create a Nostr identity, post messages, and follow others. Since Nostr is decentralized, there are many other Nostr-based apps available.

Like Primal.net another website using the same protocol (using the same secret key),

What is a protocol? Imagine email. Email itself is a protocol, just like Nostr.

Different email providers like Gmail or Yahoo Mail are like the Nostter.app - they use the email protocol to offer their email services.




Jul 19, 2022

Playing with cards - guess red or black card trick

I found this nice article in another blog

that got me interested in card tricks

And I found this little magic trick that is pretty fun to do, and requires a little preparation

Here is how it is done:

With a deck in card, select one red card, and one black card

put them in front of the audience, and point the red card then pick from the pile 2 cards

and ask the audience to 'guess' which one is red

once the audience has selected one card, show it to the audience and then proceed with the next 2 cards in the pile.

And once 4 cards have been added to each red of black revealed card 

then return the entire stack of cards, and it surprise the audience as they will discover that all cards on the left are red, and on the right are black

See the demonstration here https://youtu.be/d7g4jQ3_Uu4

Nov 14, 2012

Tileable Patterns with GIMP

This post is for people trying to create tile able patterns using Gimp

Let's start with an openclipart symbol
http://openclipart.org/detail/1634/clothes-iron-by-johnny_automatic


Open this svg file in Gimp - resize it to 400x314 pixels
goto Layer / scale and put 200x157 pixels
duplicate this layer
On the 1st layer goto Transform / Flip Horizontal
On the 2nd layer - select layer to image size
then goto Transform /offset then click on the Offset by x/2, y/2 button and click on the Wrap Around radio button
The result should be :


Now select copy visible / and paste as pattern

you can now create a new image 1600x1200 pixels with a dark background
and fill that image with the above pattern

The result will look like this :


Oh ?! you wanted an "Iron man 3 wallpaper" ?!

Jan 30, 2009

Nautilus-action : Generating thumbnails script


Still in my quest to find a smart way to generates thumbnails from a selected pictures I stumble on this nautilus-action script
Make thumbnails from selected images | GrumZ.Net

And then I pushed it a little further (code below) so it creates a thumbnail sub-directory and add a little blur effect (previously discovered in a previous post) -

Enough talk> here's the code :


#!/bin/bash
# ===========================================
# Thumb_export.sh
# ===========================================
# Script called by nautilus-action
# This script can handle multiple selection
# from various directories
# ===========================================
# REP = current directory path
# THB = thumbnail path and filename
# THB_SIZE = size of the thumbnail
# ===========================================
# version 0.02a
# Fri 30 Jan 2009 04:22:32 PM CET

THB_SIZE="184"

for f in "$@"; do
# extracting the current directory and create a thumbnail sub directory
REP=`dirname "$f"`"/thumbnail"
if `test -d $REP`; then echo "thumbnail dir already exists"; else mkdir $REP; fi
THB=`echo $REP`"/`basename $f`"
# now generates the thumbnail with
convert $f -thumbnail $THB_SIZE \( +clone -blur 0x3 +level 20%,100% \) \
\( +clone -gamma 0 -shave 10x10 \
-bordercolor white -border 10x10 \) \
-composite \
\( +clone -gamma 0 -shave 10x10 \
-bordercolor white -border 1x1 \
-bordercolor black -border 9x9 \) \
-compose screen -composite \
$THB
done

xmessage "OK, it's done"

NB : I do not pretend to be a brilliant shell developer ; so be careful when using this code, the dozen of tests I performed with it (with multiple selection (across various directories), jpg, png, etc ...) worked, so I can say that nothing terrible (or funny) should happened.

But of course, if you're a shell wizard - I would totally appreciate your comment or help.

Jan 26, 2009

RPG scenario generator (2)

Following my post (myMix: RPG scenario generator (1)) about creating a spreadsheet for RPG scenario - this is the script here to download OpenOffice spreadsheet (compatible with Google docs)



Jan 15, 2009

RPG scenario generator (1)




















Now for something completely different, spreadsheets ... ;)

A few weeks ago, I had some nostalgia over the good old time of role playing game (rpg) like AD&D and created 2 maps - and a quick scenario.

But I wanted to develop something funnier, a sort of "rpg scenario generator" the idea was simple - using a generic sentence such as "In terrain_type the group will have to scenario_quest fighting against evil_boss and his army of evil_monster ; etc ..."
I would use a random number for each field (terrain_type, scenario_quest, etc ...) and voila ! pressing recalculate would generate a new scenario ... no more lack of Dungeon Master's inspiration.

First I thought using java, perl or python that would read a xml file - then deduce the number of xml file entry, from this number - select a random number and then print the selection - that would do the job ... xml would be great as I would be able to add new lines, and no need to modify the source.

But then (because of my lack of knowledge of perl, java, python ...) and since a spreadsheet such as openoffice Calc, Excel, or google doc would be as good to do the job.
I started a basic sheet using max(), vlookup() and randinbetween(). And it works !!!

Also in the process I found a very nice google doc feature that doesn't exist elsewhere and that is the "filter()" function (see the picture above - for a comparison with the more "standard" vlookup() function).

As you can see on the pictures, it's just a proof of concept - the yellow cell contains the random number (from 1 to max()) of the item's column - the blue cell contains the result - that will be used to build the "one sentence" rpg scenario.

Functions : Function list - Google Docs Help Center
Subscribe to: Posts (Atom)

Popular Posts

  • A little pseudo painting using ArtRage2 - "Spring" is the word !
  • What is it lately, this unexplainable need to change everything that works ? What about this idiom " if it ain't broke, don't ...
  • After I gave a shot at ArtRage2 bundled with the Wacom tablet, I took the other cd that was in the box - and installed .... Photoshop Eleme...
  • Hannah Wagner (better known by her stage name Miss Hannah Minx; born Oct. 1990) is an American vlogger known on Youtube for her Kawaii ...

AltStyle によって変換されたページ (->オリジナル) /