Skip to content

Instantly share code, notes, and snippets.

View jesgs's full-sized avatar
🍜
Ramen connoisseur

Jess Green jesgs

🍜
Ramen connoisseur
View GitHub Profile
@jesgs
jesgs / correctLineWidth.py
Created July 25, 2016 00:59
Correct LineWidth values for ToonShader nodes for Poser 7 and earlier. Poser versions prior to 8 handled the LineWidth node value differently than Poser 8 and later. This script allows you to batch-correct the line-value, saving the effort of having to click on every single material.
# Correct LineWidth values for ToonShader nodes for Poser 7 and earlier
#
# Poser versions prior to 8 handled the LineWidth node value differently
# than Poser 8 and later. This script allows you to batch-correct the line-value,
# saving the effort of having to click on every single material.
import poser
scene = poser.Scene()
actor = scene.CurrentActor()
DELIMITER |
CREATE PROCEDURE explode( pDelim VARCHAR(32), pStr TEXT)
BEGIN
DROP TABLE IF EXISTS temp_explode;
CREATE TEMPORARY TABLE temp_explode (id INT AUTO_INCREMENT PRIMARY KEY NOT NULL, word VARCHAR(40));
SET @sql := CONCAT('INSERT INTO temp_explode (word) VALUES (', REPLACE(QUOTE(pStr), pDelim, '\'), (\''), ')');
PREPARE myStmt FROM @sql;
EXECUTE myStmt;
END |
@jesgs
jesgs / class-flash-messages.php
Created January 29, 2015 17:38
Session-based flash messaging for WordPress
<?php
/**
* Flash Messages helper class
*
* @package FlashMessages
* @author Jess Green <jgreen @ psy-dreamer.com>
* @license http://opensource.org/licenses/MIT MIT
*/
class FlashMessages
{
@jesgs
jesgs / config
Created June 6, 2017 16:49 — forked from chriswgerber/config
SSH Config
Host *
Compression yes
ControlMaster auto
ControlPath /tmp/ssh-conn-%r@%h:%p.con
ControlPersist 30
ForwardAgent yes
ServerAliveInterval 100
IdentityFile ~/.ssh/id_rsa
AddKeysToAgent yes
UseKeychain yes
@jesgs
jesgs / create_php_array.sql
Created June 10, 2017 16:28
Generate a PHP array from a sql query
-- I'm lazy so this is what I did
SELECT CONCAT("['id' => ", id, ", 'some_column_string' => '", some_column, "'],") FROM mytable;
<?php
/**
* Theme view template example using locate_template
*
* @return string
*/
function my_theme_template()
{
// do view related stuff
@jesgs
jesgs / README-git-hooks.md
Last active December 8, 2017 15:59
Git post-receive hook for running npm run production on Laravel installs

Just some git hooks I'm putting together

Matcha Green Tea Mug Cake

Picture on Instagram

Tools:

Favorite large mug. Soup mug would be ideal.

Ingredients:

  • 4 tbs flour (sifted)
  • 2 tbs sugar
@jesgs
jesgs / console-log.php
Created August 8, 2018 18:19
Quick var_dump for the console
<?php
// maybe expand this to do more than just objects and arrays?
echo "<script>console.log(" . json_encode($myObjectOrArray) . ");</script>";
.marquee {
overflow: hidden;
position: relative;
}
.marquee .responsive-table {
width: 100%;
height: max-content;
display: block;