Skip to content

Instantly share code, notes, and snippets.

View Kevinlearynet's full-sized avatar

Kevinleary.net Kevinlearynet

View GitHub Profile
@Kevinlearynet
Kevinlearynet / Magnific Config
Last active May 11, 2016 17:55
Maginfic config throws errors with .split( "_" ) method in _parseMarkup()
{
"items": [
{
"src": "#golden-union-fish-bar-1",
"type": "inline"
},
{
"src": "#trident-fish-chips-2",
"type": "inline"
},
<h2 class="dinner-title">Dinner Menu</h2>
<div class="dinner-item">
<h3><a id="toggleDisplay"></a>Seasonal Selections</h3>
<div id="mspecials" style="display: none;">
<h4>Cocktails</h4>
<strong>watermelon sangria</strong>
summer in a glass...nantucket's triple 8 cranberry vodka, red moscato and a watermelon float glass 6.99 / pitcher 15.99
<strong>rootbeer float</strong>
tito’s hand-made vodka, sambuca, root beer and vanilla ice cream 7.99
require 'formula'
class Uniconvertor < Formula
homepage 'http://sk1project.org/modules.php?name=Products&product=uniconvertor'
url 'http://sk1project.org/dc.php?target=uniconvertor-1.1.5.tar.gz'
sha256 '51ec7c4487048c3357ed95cdb4ab3524018a2c9e'
depends_on 'sk1libs'
# make it see it's own and sk1libs modules
@Kevinlearynet
Kevinlearynet / uniconverter.rb
Created April 14, 2017 16:23
Uniconverter formula for Homebrew
require 'formula'
class Uniconvertor < Formula
homepage 'http://sk1project.org/modules.php?name=Products&product=uniconvertor'
url 'http://sk1project.org/dc.php?target=uniconvertor-1.1.5.tar.gz'
sha256 '51ec7c4487048c3357ed95cdb4ab3524018a2c9e'
depends_on 'sk1libs'
# make it see it's own and sk1libs modules
{
"anonymousId": "6aaa00b4-71d4-4ae0-9fb0-46a1bd240f36",
"context": {
"library": {
"name": "analytics.js",
"version": "3.4.0"
},
"page": {
"path": "/term-quote/",
"referrer": "",
{
"anonymousId": "29c35577-99a5-4228-8333-2958e0fda1c4",
"context": {
"library": {
"name": "analytics.js",
"version": "3.4.0"
},
"page": {
"path": "/life-insurance-calculator/questions/",
"referrer": "https://www.sbli.com/?utm_source=google&utm_medium=cpc&utm_term=SBLI&utm_content=TQ_Branded_TL_PINHV_Our-Accel-Underwriting&utm_campaign=SBLI_NJ_Search_Branded&gclid=Cj0KCQjw-uzVBRDkARIsALkZAdkDr81kvsw5xlQ1oWUBKPu_JzwTc3XIrFNU8JfyxSO1fEykUN5oABEaAgEcEALw_wcB",
@Kevinlearynet
Kevinlearynet / php.rb
Last active May 9, 2018 19:20
Homebrew php formula that supports --with-homebrew-curl
class Php < Formula
desc "General-purpose scripting language"
homepage "https://secure.php.net/"
url "https://php.net/get/php-7.2.5.tar.xz/from/this/mirror"
sha256 "af70a33b3f7a51510467199b39af151333fbbe4cc21923bad9c7cf64268cddb2"
bottle do
sha256 "bbd116d08df396ba4048f073974fbb9f72873f6fa7dd562276ef542d1b3d6449" => :high_sierra
sha256 "d61496a1f613f6bd1bf103f9985d1758ed298a2b1c2cf9b0d1bb1cf675974396" => :sierra
sha256 "158fa211bde0818ff0ed97c65735b1b649955db68a9868af8a9ca572f78d34c3" => :el_capitan
blockquote p {
...
&:before {
content: "\201C";
text-indent: -.65em;
display: inline-block;
}
&:after {
@Kevinlearynet
Kevinlearynet / locale-en_uk.json
Last active August 15, 2018 17:03
String translations needed for each locale.
{
"itunes_app": "https://itunes.apple.com/us/app/tripadvisor-hotels-flights/id284876795?mt=8",
"google_play_app": "https://play.google.com/store/apps/details?id=com.tripadvisor.tripadvisor&hl=en_uk",
"twitter_handle": "tripadvisoruk",
"facebook_link": "https://www.facebook.com/TripAdvisor",
"img_tripadvisor_blog": "tripadvisor-blog.svg",
"img_tripadvisor_tagline": "tripadvisor-tagline.svg",
"hotels": "Hotels",
"flights": "Flights",
"rentals": "Rentals",
// Save PDF from HTML Microservice
https://addaptive-microservices.herokuapp.com/api/html-to-pdf
const puppeteer = require('puppeteer');
class Webpage {
static async generatePDF(html) {
const browser = await puppeteer.launch({ headless: true }); // Puppeteer can only generate pdf in headless mode.
const page = await browser.newPage();