Ever wanted to render nunjucks macros from Ruby? Neither have I, until half an hour ago.
Here's a quick approach using the excellent Schmooze from Shopify.
Save nunjucks.rb in a new directory then:
Ever wanted to render nunjucks macros from Ruby? Neither have I, until half an hour ago.
Here's a quick approach using the excellent Schmooze from Shopify.
Save nunjucks.rb in a new directory then:
| # used different forum posts/guides to figure this out like: | |
| # The uninstall script is located at /Library/Parallels/Parallels Service.app/Contents/Resources | |
| # https://github.com/danijeljw/remparallels/blob/master/remprls.sh | |
| # https://kb.parallels.com/122461 | |
| # sudo find / -iname "*parallels*" | |
| # sudo find / -iname "*prl*" | |
| #before uninstalling deactivate your licencse - this won't be possible after uninstall | |
| prlsrvctl deactivate-license |
| # The following comments fill some of the gaps in Solargraph's understanding of | |
| # Rails apps. Since they're all in YARD, they get mapped in Solargraph but | |
| # ignored at runtime. | |
| # | |
| # You can put this file anywhere in the project, as long as it gets included in | |
| # the workspace maps. It's recommended that you keep it in a standalone file | |
| # instead of pasting it into an existing one. | |
| # | |
| # @!parse | |
| # class ActionController::Base |
| var fs = require('fs'); | |
| var request = require('request'); | |
| var EventEmitter = require('events').EventEmitter; | |
| var mime = require('mime'); | |
| var util = require('util'); | |
| function resumableUpload() { | |
| this.byteCount = 0; //init variables | |
| this.tokens = {}; | |
| this.filepath = ''; |
| require 'sidekiq/api' | |
| # 1. Clear retry set | |
| Sidekiq::RetrySet.new.clear | |
| # 2. Clear scheduled jobs | |
| Sidekiq::ScheduledSet.new.clear |
| #!/bin/sh | |
| # It seems it's very hard to set resample output quality with Ghostscript. | |
| # So instead rely on `prepress` preset parameter to select a good /QFactor | |
| # and override the options we don't want from there. | |
| gs \ | |
| -o resampled.pdf \ | |
| -sDEVICE=pdfwrite \ | |
| -dPDFSETTINGS=/prepress \ |
| <?php | |
| // put array in here | |
| $array = array ( | |
| 'key' => 'group_54624ad06f391', | |
| 'title' => 'Company List', | |
| 'fields' => array ( | |
| array ( | |
| 'key' => 'field_54624aff43237', | |
| 'label' => 'Companies', |
| <?php | |
| use Guzzle\Common\Event; | |
| use Guzzle\Http\Message\Header; | |
| use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
| class ForceCharsetPlugin implements EventSubscriberInterface | |
| { | |
| private $forcedCharset = 'utf8'; |