Skip to content

Instantly share code, notes, and snippets.

Avatar
🍊
Eating an orange

Andrew Lazarus yratof

🍊
Eating an orange
View GitHub Profile
@yratof
yratof / morphagene_ableton.py
Created Jan 12, 2022 — forked from knandersen/morphagene_ableton.py
Allows you to use Ableton projects and exports as reels for the Make Noise Morphagene eurorack module.
View morphagene_ableton.py
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
USAGE:
morphagene_ableton.py -w <inputwavfile> -l <inputlabels> -o <outputfile>'
Instructions in Ableton:
Insert locators as splice markers in your project (Create > Add Locator)
Export Audio/Video with
Sample Rate: 48000 Hz
@yratof
yratof / brew-cleanup.sh
Created Oct 26, 2021
Brew permission fixer
View brew-cleanup.sh
# https://stackoverflow.com/questions/16432071/how-to-fix-homebrew-permissions
sudo chown -R "$USER":admin 'path-to-thing-brew-complains-about'
@yratof
yratof / ae_wiggle_posterise.js
Created Oct 14, 2021
After effects posterise wiggle
View ae_wiggle_posterise.js
f = 2; // Freq
a = 10; // Amount
posterizeTime(f); // Posterise it
wiggle(f, a); // Wiggle that
@yratof
yratof / mm_HeightToNormal.osl
Last active Oct 7, 2021
OTOY Octane Height_To_Normal.OSL
View mm_HeightToNormal.osl
#include <octane-oslintrin.h>
// IMPORTANT: Make sure the input
// is using OSL delayed UV projection.
//
// This shader will convert a height map to a tangent normal map
// based on the average value, luminance or intensity of one of the RGB channels.
//
// If you need many of these nodes with Quality set to High,
// please consider using the baking texture node.
@yratof
yratof / dbngin.sh
Created Oct 7, 2021
Avoiding socket error with dbngin
View dbngin.sh
# Futher info here: https://github.com/TablePlus/DBngin/issues/38
mysql --socket /tmp/mysql_3306.sock -uroot
@yratof
yratof / scripts.php
Created Sep 1, 2021
Add scripts to customizer for wordpress
View scripts.php
<?php
/* Customiser script */
add_action( 'customize_register', 'custom_editor' );
function custom_editor( $wp_customize ) {
// Analytics section
$wp_customize->add_section('analytics_section', array(
'title' => __( 'Analytics', 'tuesday' ),
'description' => __( 'Enable tracking and analytics by placing your script tags in the correct location. <small><strong>Note:</strong> All scripts must be self-containing &lt;script&gt;&lt;/script&gt;, otherwise they will just print the code onto the website.</small>', 'tuesday' ),
@yratof
yratof / multisite.php
Created Sep 1, 2021
Show the site_name on sites.php with multisite wordpress
View multisite.php
<?php
/* Add site_name as a column */
add_filter( 'wpmu_blogs_columns', 'add_useful_columns' );
function add_useful_columns( $site_columns ) {
$site_columns['site_name'] = 'Site Name';
return $site_columns;
}
/* Populate site_name with blogs site_name */
@yratof
yratof / grep.sh
Created May 6, 2021
InDesign GREP to replace thousands separator
View grep.sh
GREP thousands comma, replace with space
# https://community.adobe.com/t5/indesign/grep-find-change-decimal-and-thousands/m-p/6130240
Find: (?<=\d)[., ](?=\d\d\d)
Replace: ' ';
@yratof
yratof / add_title_to_image.sh
Created Jan 28, 2021
Adding a title to the bottom left of an image with imagemagick convert
View add_title_to_image.sh
convert image.jpg -resize 1200x\> -pointsize 18 -draw "gravity southwest text 20, 20 'Title of the image'" out-image.jpg;
@yratof
yratof / gist:78b192aafd2631506025b65c62091f19
Last active Jul 31, 2020
Create {asset types} for {your company name or industry} marketing campaigns
View gist:78b192aafd2631506025b65c62091f19
{Description of your company, target audience, and goal of marketing campaign}
We're searching for a talented designer to help us bring our next branding campaign to life. We're looking for someone to design {asset types}. Please see the attached document for examples of our past campaigns.
Deliverables needed:
- {List of assets needed}
Special skills needed for this project:
- Advanced knowledge of {Sketch, Invision Studio, Figma, Adobe Creative Cloud or other software}
- {Other requirements for industry, marketing or acquisition campaign experience, software, design principles}