Jeremy Modjeska https://modjeska.us/ Sun, 12 Mar 2023 07:54:41 +0000 en-US hourly 1 https://wordpress.org/?v=6.1.5 https://i.modjeska.us/2018/04/dragon_white.jpg Jeremy Modjeska https://modjeska.us/ 32 32 Empowering Leaders with G.R.E.A.T. Decision Making https://modjeska.us/empowering-leaders-with-g-r-e-a-t-decision-making/ https://modjeska.us/empowering-leaders-with-g-r-e-a-t-decision-making/#respond Sun, 12 Mar 2023 07:46:07 +0000 https://modjeska.us/?p=2080 The G.R.E.A.T. Decision Making model describes five essential ingredients to equip decision-makers for success. It is a recipe for empowering rising leaders with more authority and for driving efficiency in a growing organization. In a startup’s early stages, decision-making is
Read more ›

The post Empowering Leaders with G.R.E.A.T. Decision Making appeared first on Jeremy Modjeska.

]]>
published on

The G.R.E.A.T. Decision Making model describes five essential ingredients to equip decision-makers for success. It is a recipe for empowering rising leaders with more authority and for driving efficiency in a growing organization.

In a startup’s early stages, decision-making is concentrated with a small team — usually founders and their closely-knit and highly-motivated early hires. Well-informed, timely, and savvy decisions during these nascent days are crucial for the business’s survival. But as the organization grows, communication channels increase exponentially, and suddenly our expert decision-makers find themselves removed — physically and temporally — from day-to-day decisions.

At this stage, if our founding heroes are the only ones with the tools to make wise decisions for the business, then bad things start to happen. Bottlenecks form, delaying action and hindering the organization’s efficiency and (ironically) its growth. Cultural costs also accrue in the form of disempowerment among managers and individual contributors, real or perceived lack of trust from leadership, and barriers to career development.

The G.R.E.A.T. Decision Making model describes five essential ingredients to equip decision-makers for success:

  • Guardrails
  • Resources
  • Expectations
  • Accountability
  • Trust

Read the whole article on the Highspot Blog.

The post Empowering Leaders with G.R.E.A.T. Decision Making appeared first on Jeremy Modjeska.

]]>
https://modjeska.us/empowering-leaders-with-g-r-e-a-t-decision-making/feed/ 0
Remote Internships Are Here to Stay – Here’s What We’ve Learned https://modjeska.us/remote-internships-are-here-to-stay-heres-what-weve-learned/ https://modjeska.us/remote-internships-are-here-to-stay-heres-what-weve-learned/#respond Sat, 12 Mar 2022 06:20:07 +0000 https://modjeska.us/?p=2072 Highspot and Smartsheet both believe in internships as important levers for hiring and building diverse teams, as springboards for people entering the engineering field, and as worthy investments in the future of tech workers. For both of our companies, the
Read more ›

The post Remote Internships Are Here to Stay – Here’s What We’ve Learned appeared first on Jeremy Modjeska.

]]>
published on

Highspot and Smartsheet both believe in internships as important levers for hiring and building diverse teams, as springboards for people entering the engineering field, and as worthy investments in the future of tech workers. For both of our companies, the rapid shift to remote internships beginning in 2020 was a major adjustment for everyone involved.

I partnered with Smartsheet’s University Programs Manager Lauren Houk to dive into what we’ve collectively learned. In this article, we share context on why internships matter, the challenges of moving from in-person to remote internships, and the solutions we’ve discovered.

Read the whole article on the Highspot Blog.

The post Remote Internships Are Here to Stay – Here’s What We’ve Learned appeared first on Jeremy Modjeska.

]]>
https://modjeska.us/remote-internships-are-here-to-stay-heres-what-weve-learned/feed/ 0
Zoom Meetings for Live Music Events https://modjeska.us/zoom-meetings-for-live-music/ https://modjeska.us/zoom-meetings-for-live-music/#comments Wed, 01 Apr 2020 19:54:43 +0000 https://modjeska.us/?p=1947 During these times of great stress and mandatory quarantine, we need live music more than ever. And while videoconference apps are the new normal for staying in touch, they are optimized for the kind of low-quality audio that business people
Read more ›

The post Zoom Meetings for Live Music Events appeared first on Jeremy Modjeska.

]]>
During these times of great stress and mandatory quarantine, we need live music more than ever. And while videoconference apps are the new normal for staying in touch, they are optimized for the kind of low-quality audio that business people need when they’re talking about business in their business meetings. With a little work, though, you can unlock the full potential of your VC app and make your live music sound good to your remote listeners. Here are some tips for configuring Zoom for a live music event.

Disclaimer: I don’t work for Zoom and I am in no way qualified to give musical advice to anyone. These are suggestions based on experimentation. Your mileage may vary. No musicians were harmed in the making of this post.

General Advice

  1. 1.

    Use Zoom Pro. Your show will probably exceed 40 minutes, and you’ll want to record it, and you’ll want some of the advanced settings below. All of those depend on a non-free version of Zoom. You may already have a Zoom Business account, and since Zoom accounts incur a flat monthly rate, your company may not mind your using it for personal endeavors like bringing beautiful music to your friends and family. Of course, responsible corporate citizens will want to check with their IT team before they use a company Zoom account for personal meetings.

  2. 2.

    Have a single source of music. Latency is unpredictable and varies by participant, so it’s unlikely that you can pull off a coordinated performance with multiple Zoom participants playing music simultaneously. A single source of music is your best bet.

  3. 3.

    Use a stereo line out for the music / performers. Don’t rely on the built-in microphone on a laptop, tablet, or phone to transmit quality audio. The music source should be a stereo line out from a sound board (or whatever you kids use to mix music these days). Optionally, the musician(s) can also Zoom in from a secondary device when they want to take a break and casually chat with other attendees.

  4. 4.

    Do a sound check with a remote participant. Before you perform in front of your masses of fans, friends, mom, etc., experiment with all of the settings described below to dial-in your perfect audio configuration prior to the show. Take detailed notes as you discover the optimal settings because musicians drink a lot and they won’t remember all of the configuration steps on the day of the show.

  5. 5.

    Have a non-performer (co-)host the meeting. Throughout the beautiful performance, people will insist on unmuting themselves and making irritating noises (e.g., “singing along”). To maximize the audio quality of the music, and minimize interruptions during the performance, a designated host or co-host can mute and unmute all non-performer guests at appropriate times. Don’t expect the musicians to do this; they will be preoccupied with making music. And drinking.

Host Configuration

As the Zoom meeting owner, you will need to preconfigure some settings in your Zoom account. Follow these steps before you create the Zoom meeting.


Enable stereo

As the host, you must allow your participants to enable stereo sound. To do that, login to your Zoom account in a browser (not the app) and navigate to Settings > In Meeting (Advanced). Enable Allow users to select stereo audio in their client settings. (Zoom help)


Enable original sound

This is the most important setting. As the host, you have to explicitly enable this (and then some more complicated shit happens later in the Musician configuration detailed below). As above, login to your Zoom account in a browser (not the app) and navigate to Settings > In Meeting (Advanced). Enable the option for Allow users to select original sound in their client settings. (Zoom help)


Mute participants on entry

This will help prevent disruptions in the middle of a performance. Per General Advice above, make sure a designated (co-)host can also unmute participants at appropriate times. Protip: people will turn on you quickly you if you forget to unmute them. (Zoom help)

Musician Configuration

The first three items below are essential. The rest are variables you can experiment with during sound check.

Join the Zoom from the Mac or PC Zoom app

As the performer, don’t try to use a tablet or phone because you won’t have access to the advanced options that are needed to optimize your audio.

Enable stereo

After joining the Zoom, you’ll find this setting in your Zoom app under Audio (bottom left) > Audio Settings > Enable Stereo.


Enable original sound

This one is complicated, but stay with me because it’s the most important step. After you join the Zoom on your Mac or PC, in your main Zoom window, click on Audio (bottom left) > Audio Settings > Advanced. Check the box for Show in-meeting option to ‘Enable Original Sound’ from microphone.

With that setting enabled, close the settings window, and, back in your main Zoom window, look for Turn on original sound in the top left. Click on that to enable original sound (when it says Turn off original sound, you’ll know it’s turned on).


Experiment with background noise suppression

During sound check, after completing the above steps, have your remote sound-checker evaluate whether you sound better with the following settings enabled or disabled (my suggestion: disable both).

Audio (bottom left) > Audio Settings > Suppress Persistent Background Noise.

Audio (bottom left) > Audio Settings > Suppress Intermittent Background Noise.


Participant (Listener) Configuration

Host: share these recommendations with your listener attendees.


Enable stereo

After joining the Zoom, you’ll find this setting in your Zoom app under Audio (bottom left) > Audio Settings > Enable Stereo.


Mute yourself when people are playing music

Even in the fake dream world where you have perfect pitch, latency will still ruin your singalong. Don’t subject your friends to that; mute while the musicians are performing.


Connect to a decent sound system

If your musician friends have correctly configured their audio settings, then they have unlocked your ability to enjoy their performance at its fullest potential. It’s your responsibility now to maximize the presence and authenticity of their sound. Your laptop, tablet, or phone speakers won’t rise to this challenge. If a decent stereo system is at your disposal — via airplay, hard wire, etc. — you’ll enjoy the show appreciably more if you connect your device to a boss system.

The post Zoom Meetings for Live Music Events appeared first on Jeremy Modjeska.

]]>
https://modjeska.us/zoom-meetings-for-live-music/feed/ 8
The Process is the Decision: How decision-making frameworks influence outcomes https://modjeska.us/the-process-is-the-decision/ https://modjeska.us/the-process-is-the-decision/#respond Thu, 25 Jul 2019 00:07:50 +0000 https://modjeska.us/?p=1932 Organizational process design is paramount to successful leadership. Intentional or not, we construct and model the communication frameworks that govern the way our teams make decisions. Ideally, we approach this responsibility deliberately, establishing processes that empower where empowerment matters; that
Read more ›

The post The Process is the Decision: How decision-making frameworks influence outcomes appeared first on Jeremy Modjeska.

]]>
published on

Organizational process design is paramount to successful leadership. Intentional or not, we construct and model the communication frameworks that govern the way our teams make decisions. Ideally, we approach this responsibility deliberately, establishing processes that empower where empowerment matters; that safeguard where boundaries are called for; that flex and harden and stretch; that encourage outcomes consistent with our guiding principles. Inevitably, the processes we adopt won’t just guide our decisions — in tangible ways, the processes are the decisions.

In a growing company, two business-critical examples of where process-as-decision has lasting and material consequences are hiring and product development. In this article I wrote for Highspot, I briefly explain why and encourage greater appreciation for the significance of value-driven, intentional process design.

Read the whole article on the Highspot Blog.

The post The Process is the Decision: How decision-making frameworks influence outcomes appeared first on Jeremy Modjeska.

]]>
https://modjeska.us/the-process-is-the-decision/feed/ 0
Fetch a Remote CSV in Google Sheets with Basic Auth https://modjeska.us/csv-google-sheets-basic-auth/ https://modjeska.us/csv-google-sheets-basic-auth/#respond Thu, 16 Aug 2018 07:50:24 +0000 https://modjeska.us/?p=1917 This is a Google Apps Script custom function that facilitates importing a remote CSV file into your Google Sheets document. It provides for basic HTTP auth traversal. This is based upon an older solution described on the Redfin engineering blog,
Read more ›

The post Fetch a Remote CSV in Google Sheets with Basic Auth appeared first on Jeremy Modjeska.

]]>
source code

This is a Google Apps Script custom function that facilitates importing a remote CSV file into your Google Sheets document. It provides for basic HTTP auth traversal. This is based upon an older solution described on the Redfin engineering blog, which no longer works (probably due to changes over time in Google Sheets functionality).

The post Fetch a Remote CSV in Google Sheets with Basic Auth appeared first on Jeremy Modjeska.

]]>
https://modjeska.us/csv-google-sheets-basic-auth/feed/ 0
Perl Rollbar Notifier https://modjeska.us/rollbar-perl/ https://modjeska.us/rollbar-perl/#respond Tue, 10 Jul 2018 02:27:23 +0000 https://modjeska.us/?p=1911 Here’s a simple way to log to Rollbar with Perl. I found that WebService::Rollbar::Notifier didn’t compile without failures, and didn’t work out of the box. Since all I needed was very simple logging, I rolled my own solution.

The post Perl Rollbar Notifier appeared first on Jeremy Modjeska.

]]>
source code

Here’s a simple way to log to Rollbar with Perl. I found that WebService::Rollbar::Notifier didn’t compile without failures, and didn’t work out of the box. Since all I needed was very simple logging, I rolled my own solution.

The post Perl Rollbar Notifier appeared first on Jeremy Modjeska.

]]>
https://modjeska.us/rollbar-perl/feed/ 0
Improving diversity through engineering internship programs https://modjeska.us/diversity-engineering-internships/ https://modjeska.us/diversity-engineering-internships/#respond Mon, 21 May 2018 05:21:48 +0000 https://modjeska.us/?p=1896 Partnering with socially-conscious coding bootcamps for your internship program can form the foundation of your diversity initiative and provide access to engineering careers for traditionally underrepresented groups. Are these internships right for your company, and are you adequately prepared to
Read more ›

The post Improving diversity through engineering internship programs appeared first on Jeremy Modjeska.

]]>
published on

Partnering with socially-conscious coding bootcamps for your internship program can form the foundation of your diversity initiative and provide access to engineering careers for traditionally underrepresented groups. Are these internships right for your company, and are you adequately prepared to host an intern?

A software engineering internship is a formative experience for a coding bootcamp graduate. Internships bridge the bootcamp’s abbreviated technical curriculum with an entry-level developer job. And because bootcamps actively recruit and graduate women, minorities, and other groups underrepresented in tech at much higher rates than universities do, providing internship opportunities for these graduates is an important lever in closing the gender gap and diversifying our shared candidate pool. Internship programs, furthermore, bring significant value to your team, your company’s culture, and your recruiting efforts.

But internships aren’t free — they require investment, particularly in your company culture — and they aren’t right for every team at every moment. In this article, I’ll explore some key considerations that hiring managers and company leaders should account for when building an internship program that caters to coding bootcamp graduates.

Part I: Incentive. Building the case for diversity and inclusion.

Part II: Investment. Weighing the costs and benefits of engineering internships.

Part III: Implementation. Essential features of a successful internship program.

Read the whole article on Medium.

The post Improving diversity through engineering internship programs appeared first on Jeremy Modjeska.

]]>
https://modjeska.us/diversity-engineering-internships/feed/ 0
DIY Masonry-Style Image Gallery https://modjeska.us/diy-image-gallery/ https://modjeska.us/diy-image-gallery/#comments Mon, 23 Apr 2018 06:25:13 +0000 https://modjeska.us/?p=1768 I recently gave up on image gallery plugins for WordPress. They come with extra overhead, they do too many things I don’t need, and they don’t do enough of what I want. Furthermore, I dislike how WordPress organizes content. I
Read more ›

The post DIY Masonry-Style Image Gallery appeared first on Jeremy Modjeska.

]]>
source code

I recently gave up on image gallery plugins for WordPress. They come with extra overhead, they do too many things I don’t need, and they don’t do enough of what I want. Furthermore, I dislike how WordPress organizes content. I want control, automation, and a beautiful layout.
Final Product - PIG Gallery on modjeska.us
Take a look at one of my image galleries for a working demo of what I came up with. This post will walk you through how to build image galleries like this one with minimal effort.

Steps

  1. 1.

    Basic PIG. Progressive Image Grid (PIG.js) is the JavaScript library that will power our image gallery. We’ll get a simple test page up and running with out-of-the-box PIG.

  2. 2.

    Extending PIG. PIG needs a few tweaks to reach its full potential. We’ll make a few quick adaptations, including adding Swipebox support.

  3. 3.

    Automation. While the PIG library is handy, it doesn’t do the heavy lifting of generating all those image thumbnails and directory structures we need. As with all problems in the universe, the solution is a Perl script to automate things.

  4. 4.

    WordPress Integration. The above steps are sufficient to facilitate the creation of image galleries with minimal effort. You can stop there if you want to, or optionally add some code to WordPress to simplify adding PIG-powered galleries. This step will not require any plugin installation. Instead, we’ll build a lightweight custom plugin from scratch so you have complete visibility and control over what is going on.

Basic PIG

Dan Schlosser’s Progressive Image Grid (PIG.js) is a responsive and lightweight JavaScript library that progressively and elegantly loads images as you scroll. It looks similar to the Google Photos album layout, which is the look I was interested in for my photo galleries. To get started, let’s see a test project using pure standard PIG without any modifications.

Click on the source code link at the top and clone the Github project, or just download the files for example-project-1. You should be able to open index.html locally in your browser and see a simple gallery with four images:

PIG Example 1

Easy, right? But wait …

These images aren’t clickable! PIG doesn’t have support for image modals or linking.

There are a lot of extra images! While there are only four images on the page, each full-size image requires four additional thumbnails in the /img directory — that’s 16 additional images I had to create for this simple page.

├── img
│   ├── 20
│   |   ├── vn.jpg
│   |   ├── vn2.jpg
│   |   ...
│   |
│   ├── 100
│   |   ├── vn.jpg
│   |   ├── vn2.jpg
│   |   ...
│   |
│   ├── 250
│   |   ├── vn.jpg
│   |   ├── vn2.jpg
│   |   ...
│   |
│   └── 500
│       ├── vn.jpg
│       ├── vn2.jpg
│       ...
...

There is math happening in here! The JavaScript contains an aspect ratio for each image in order for PIG to work its magic. So, on top of creating 16 images, I had to divide height and width to get ratios.

var imageData = [
{"filename": "vn.jpg", "aspectRatio": "1.3300"},    // 1.3300: that requires math!
{"filename": "vn2.jpg", "aspectRatio": "1.6300"},
{"filename": "vn3.jpg", "aspectRatio": "1.3300"},
{"filename": "vn4.jpg", "aspectRatio": "1.3300"},
];

Obviously, Dan has created a great tool for us to get started, but it doesn’t yet do the dishes or double on sax for us, so in the next steps we’ll fix it up and automate like crazy.

Extending PIG

Let’s move on to Example Project 2. Copy the files as before and open index.html.

PIGG Example 2

Well that’s underwheming: it looks exactly the same!

But a few things changed under the hood. First, images are clickable now. How’d we accomplish that? Cheating, of course: our friend Mark Rodgers has modified PIG to support the Swipebox library. Now images are clickable and open in fancy modals — go ahead, click on them!


How did we do that? Let’s take a look at what changed in the index.html source. First, we’ve added the Swipebox libraries, and we’ve modified the source for pig.js:

<script src="https://code.jquery.com/jquery-2.0.3.min.js"></script>
  <script src=".../jquery.swipebox/1.4.4/js/jquery.swipebox.min.js"></script>
  <script type="text/javascript" src="https://rawgit.com/jmodjeska/pigg/master/js/pig.js">

In this case, we’re using my version of pig.js as the source. It’s identical to Mark’s, except with a minor change to improve compatibility with WordPress (more on that later). This is the version we’ll be using for the remainder of the process. What else changed?

We also have some anchor text directives in the JavaScript.

addAnchorTag: true,
      anchorTargetDir: "",
      anchorClass: "swipebox"
      }).enable();
      ;( function( $ ) {
      	$( '.swipebox' ).swipebox();
      } )( jQuery );

So this gallery does what we want it to now! Let’s move on to automating things.

Automation

Now for the fun part: making a robot do all the math, image resizing, and directory setup so we don’t have to. Let’s even have it output a ready-to-use HTML file. This section assumes a basic understanding of running scripts, and a Mac or Unix/Linux system. This probably won’t work on Windows.

We’ll work with Example Project 3, which right now is just four images. Using pigg.pl, we’ll transform those four images into a gallery without any math or manual file creation. This automation script is the reason you’re here, and the first step in this process featuring any work I’ve actually done myself and not just copied from others. Let’s walk through configuration and setup.

Install Perl dependencies. This assumes you have CPAN setup locally or on the server where you’ll run this script.

cpan Image::Size
  cpan Image::Scale

If you get an error regarding libpng and/or ligjpeg, you may need to install those explicitly:

# CentOS / Amazon Linux
sudo yum install libpng-devel
sudo yum install libjpeg-devel

# Ubuntu
apt-get install libjpeg-dev
apt-get install libpng-dev
# Mac (should be pre-installed)
brew install libjpeg
brew install libpng

Open pigg.pl for configuration.

Decide where to serve pig.js from. It’s fine to serve my version from Github, but safer to upload it to your own server in case I change/break it in the future.

# Path to where pig.js is located on the internet
# You can use my version on Github, or upload and serve your own
# on your website (I recommend the second thing, in case I change
# or break my version in the future!)
our $pig = 'https://yourwebserver.com/css/pig.js';

Where will images live on your server?

# Base URI to where the images will live
# Do not use WordPress's media uploader; upload the finished product
# directly to your server
our $uri = 'https://yourwebsite.com/galleries/';

Do you want to automatically generate an index.html file when you create a gallery? Start with ‘yes’ for this tutorial. If you decide to use this script with WordPress, you’ll want to turn this off.

# Do you want to generate an index.html file when you create a gallery?
our $flag_html = 'yes';

Save pigg.pl and test drive it. Be sure to use the full path to where you’ve saved Example Project 3.

[jm@macbook /]$ cd /path/to/pigg/util/
[jm@macbook util]$ perl pigg.pl /path/to/pigg/example-project-3/

You should see output like this:

-=> Checking source directory ...                           [ OK ]
-=> Setting up new gallery structure ...                    [ OK ]
-=> Generating new images ...
    ✔ 20/vn.jpg
    ✔ 100/vn.jpg
    ✔ 250/vn.jpg
    ✔ 500/vn.jpg
    ✔ 20/vn4.jpg
    ✔ 100/vn4.jpg
    ✔ 250/vn4.jpg
    ✔ 500/vn4.jpg
    ✔ 20/vn3.jpg
    ✔ 100/vn3.jpg
    ✔ 250/vn3.jpg
    ✔ 500/vn3.jpg
    ✔ 20/vn2.jpg
    ✔ 100/vn2.jpg
    ✔ 250/vn2.jpg
    ✔ 500/vn2.jpg
                                                            [ OK ]
-=> Creating image manifest ...                             [ OK ]
-=> Writing index.html file ...                             [ OK ]

Done!

----------------------------------------------------------------
Upload example-project-3 to https://yourwebsite.com/galleries/example-project-3

You now have a full gallery project ready to use. If you upload it to yourwebsite.com/galleries/example-project-3, you can browse to https://yourwebsite.com/galleries/example-project-3 to view your new gallery!

WordPress

You don’t want to upload a plain HTML file to serve your gallery on WordPress, so let’s turn now to pigg.php, a WordPress plugin file.

First, a note about image storage. I don’t like how WordPress organizes image uploads, so I’m storing my gallery data directly on my server. Instead of this garbage that has a bunch of extra files I’ll never use:

├── /uploads/
   ├── 2018/
     ├── 04/
     ├── image1-1024x912.jpg
     ├── image1-300x267.jpg-
     ├── image1-768x684.jpg
     ├── image1-150x150.jpg
     ├── image1-600x450.jpg
     ├── image1.jpg
     ├── . . .

How about this instead?

├── /galleries/
   ├── china-2014/
     ├── image1.jpg
     ├── image2.jpg
     ├── . . .

Better, right? OK, now let’s configure a WordPress plugin that will be compatible with this straightforward image hierarchy.

Shortcode summary. The plugin — which we’re going to add manually because it’s fun and gives you full control over everything that’s happening — will let you create a gallery with this simple shortcode:

[pig gallery="gallery-name" images="image1.jpg/1.33,image2.jpg/1.24 . . ."]

Configure pigg.php. Once again, we need to tell the robot where pig.js is, and where images will live on the server:

# Line 27:
<script type="text/javascript" src="https://raw.githubusercontent.com/jmodjeska/pigg/master/js/pig.js"></script>
# Line 52:
$gallery = 'https://yourserver.com/galleries/' . $gallery;

Save the file. You’re ready to install it on your server now.

Manual plugin installation. Locate your WordPress plugins folder on your web server or using your FTP client. It should be in wp-content:

[jm@remote-webserver wp-content]$ ls
index.php  plugins  themes  upgrade  uploads

Create a new directory inside plugins called pigg:

[jm@remote-webserver wp-content]$ cd plugins
[jm@remote-webserver plugins]$ mkdir pigg

Place pigg.php in the new directory. Use FTP or, if you’re logged in to your server:

[jm@remote-webserver plugins]$ cd pigg
[jm@remote-webserver plugins]$ wget https://raw.githubusercontent.com/jmodjeska/pigg/master/wordpress/plugins/pigg/pigg.php

Verify the plugin is installed by navigating to your WordPress dashboard > Plugins:

Update pigg.pl configuration. Back on your local machine, let’s change some config values in the Perl script to tell it we’re using WordPress now.

# Do you want to generate an index.html file when you create a gallery?
our $flag_html = 'no';
# Do you want to output a WordPress shortcode when you create a gallery?
our $flag_wordpress = 'yes';

Delete everything inside the example-project-3 folder except for the four images.

[jm@macbook /]$ cd /path/to/pigg/example-project-3/
[jm@macbook example-project-3]$ rm -rf img
[jm@macbook example-project-3]$ rm index.html
[jm@macbook example-project-3]$ ls
vn.jpg	vn2.jpg	vn3.jpg	vn4.jpg

Re-run pigg.pl with the new configuration. Same command as before:

[jm@macbook /]$ cd /path/to/pigg/util/
[jm@macbook util]$ perl pigg.pl /path/to/pigg/example-project-3/

Now examine the bottom of the command output. We generated our image tree again, but now instead of an HTML file, we have a WordPress shortcode:

. . .
Done!

----------------------------------------------------------------
Upload example-project-3 to https://yourwebsite.com/galleries/example-project-3

WordPress shortcode for this gallery:

[pig gallery="example-project-3" images="vn.jpg/1.3300,vn4.jpg/1.3300,vn2.jpg/1.6300,vn3.jpg/1.3300"]

Upload your files and use the shortcode in a post. Place the whole directory, example-project-3, on your server where designated. Then, create a new WordPress post and include the shortcode provided. That’s it! You should now have a fully-functional gallery on WordPress.

The post DIY Masonry-Style Image Gallery appeared first on Jeremy Modjeska.

]]>
https://modjeska.us/diy-image-gallery/feed/ 1
Fanyi Translation Script https://modjeska.us/fanyi-translation-script/ https://modjeska.us/fanyi-translation-script/#respond Tue, 10 Apr 2018 06:15:49 +0000 https://modjeska.us/?p=1534 Fanyi is a simple translation script that employs the free Microsoft Translator API in order to translate a newline-separated text file, line by line, into almost any language. I wrote it to facilitate an internationalization proof-of-concept. Of course it isn’t
Read more ›

The post Fanyi Translation Script appeared first on Jeremy Modjeska.

]]>
source code

Fanyi is a simple translation script that employs the free Microsoft Translator API in order to translate a newline-separated text file, line by line, into almost any language. I wrote it to facilitate an internationalization proof-of-concept. Of course it isn’t meant for production use since the quality of the translations will be poor.

The script allows for a custom list of excluded words or phrases, so you can exempt from translation your brand names, HTML entities, and other untranslatable strings. Since each line is treated as a single entity, excluded strings are skipped, then merged back in.

Example

Translate a three-line file into Chinese, excluding HTML entities and two brand names.

Input:

Acme company product home page
Click <b>here</b> to login
Read about Acme's new product, the Cornballer!

Output:

Acme 公司产品主页
点击<b>这里</b>登录
阅读Acme的新产品, Cornballer!

Usage Synopsis

Single file conversion:

perl fanyi.pl input_filename.txt output_filename.txt

Multiple file conversion recursively through a directory tree:

find /path/to/target_directory -type f -exec sh -c '
perl /path/to/fanyi.pl $0 $0.new &amp;&amp;
mv $0.new $0
' {} \;

Check out the project on Github.

The post Fanyi Translation Script appeared first on Jeremy Modjeska.

]]>
https://modjeska.us/fanyi-translation-script/feed/ 0
Short URL Generator for Playground Plus Talkers https://modjeska.us/short-url-generator-for-playground-plus-talkers/ https://modjeska.us/short-url-generator-for-playground-plus-talkers/#respond Thu, 29 Mar 2018 07:37:48 +0000 https://modjeska.us/?p=1589 A short link generator that you can build into your Playground Plus talker. Usage $ mlink http://thisisaverylongurlexample.com/omg=12345 =================== You have added the following link: =================== http://thisisaverylongurlexample.com/omg=12345 Short link to this URL is: http://talker_url.org/url/e123. To share this link with the room,
Read more ›

The post Short URL Generator for Playground Plus Talkers appeared first on Jeremy Modjeska.

]]>
source code

A short link generator that you can build into your Playground Plus talker.

Usage

$ mlink http://thisisaverylongurlexample.com/omg=12345

=================== You have added the following link:  ===================

 http://thisisaverylongurlexample.com/omg=12345

 Short link to this URL is: http://talker_url.org/url/e123.
 To share this link with the room, type 'link e123'.
 To share on a multi or channel, use clink, rlink, etc.
   
===========================================================================

Live Example

This code is running on the UberWorld talker, where I created this link: http://uberworld.org/url/e296.

The post Short URL Generator for Playground Plus Talkers appeared first on Jeremy Modjeska.

]]>
https://modjeska.us/short-url-generator-for-playground-plus-talkers/feed/ 0