Photoshop script: scripting listener

When you are scripting in photoshop, you will notice not all operations you use in photoshop are found in the scripting reference. These operations can be used through the action manager (if the action is recordable).

»
on snippets and photoshop

Photoshop script: save image in pieces

For my personal project, I started with a map of the world in photoshop. This map was 16384x8192. I exported the map at about half the scale to use in unreal. When I wanted to build the project on my phone, I bumped into an issue with it. My phone could only load images that were maximum 2048x2048px.

»
on snippets and photoshop

Ruby: manipulate json

I started a project, which used an existing json file full of data. Because not all data was necessary, I decided to clean it up and rename some keywords. Instead of doing that manually, I created a ruby script.

»
on snippets, json, and ruby

Photoshop script: resize and save file

For my own personal project, I have been working quite a lot with photoshop. To keep the repetitive tasks to a minimum, I tried to script most of them. One of these is resizing and then saving/overwriting the image as a png to some location. Here is one way to do that:

»
on snippets and photoshop

Tasker: weather report

Instead of using a weather app, I made a Tasker task that will give me a notification with a short weather description twice a day. In the morning the weather of the current day, and in the evening with the weather for the next day.

»
on snippets, tasker, and android

Tasker: launch app when you plug in headphones

Another Tasker post, I love how you can automate almost everything you usually have to do manually. This is a very easy task, but I find it very useful. When I am at work, I listen to Noisli. I find this helps me keep my focus, but you can also do this with Spotify or any other app. I listen to this on my phone, but when I have a meeting, I do take my phone with me.

»
on snippets, tasker, and android

Tasker: automate your android phone

If there is one app I can definitely recommend when having an android phone, it is Tasker. This app is not free, but well worth the money. When you have to do something on your phone manually over and over, you can just automate it using the app. It also does not use a lot of battery but will potentially save some.

»
on snippets, tasker, and android

C++: view bit pattern

I was working on a hardware project, and I needed to be able to send a lot of data with only 12 bytes. Therefore when I needed to puzzle some bytes together, I opened up an online c++ compiler and got to testing quickly. In C++ you can import a library called bitset. It is useful when you want to print out your bitpattern and see the result when you are shifting bits. Here is an example:

»
on snippets and c++

Blender Script: bulk export objects

When working with blender, something you will most likely do is export your object. If there are a lot of these objects, and you want to export your meshes into seperate .obj files, it can be a very tedious job. The script below is one I use to make this as fast and easy as possible:

»
on snippets, blender, and python

Terminal: check for valid json

When I manually want to check for a valid json, I have always used jsonlint. I discovered that jsonlint has an npm and ruby package. You can find the plugin here: npm or ruby. You can either install it with npm install jsonlint -g (for npm) or gem install jsonlint (for ruby).

»
on snippets, terminal, ruby, npm, and bash

Blender script: How to change the object data name to the object name

If you rename an object in blender, you likely didn’t change the name of the object data. There is a difference in the name of the object itself, and the name of the object data. When you rename one, the other isn’t automatically renamed.

»
on snippets and blender

Blender script: How to make sure that every face has maximum 4 edges

When exporting an .obj object for use within Three.js, you will likely use the OBJLoader.js for importing the object. One thing the OBJLoader does not support, are objects with n-gons.

»
on snippets and blender