Skip to content

Instantly share code, notes, and snippets.

:shipit:
Shipping all the things!

Joe LeBlanc jlleblanc

:shipit:
Shipping all the things!
Block or report user

Report or block jlleblanc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jlleblanc
jlleblanc / centerpiece.html
Created Feb 5, 2018
A centerpiece for new browser windows
View centerpiece.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
#centerpiece {
position: absolute;
width: 99%;
View truffle.elm
module Main exposing (..)
import Html exposing (Html, text, div, img, button)
import Html.Events exposing (..)
import Http
import Json.Decode as Decode
type Msg
= TruffleFeed (Result Http.Error String)
View keybase.md

Keybase proof

I hereby claim:

  • I am jlleblanc on github.
  • I am jlleblanc (https://keybase.io/jlleblanc) on keybase.
  • I have a public key ASBKAh4rNT-IIeKwhEmzGoeV4kZDgaOyIqSE2EoUugNlggo

To claim this, I am signing this object:

View keybase.md

Keybase proof

I hereby claim:

  • I am jlleblanc on github.
  • I am jlleblanc (https://keybase.io/jlleblanc) on keybase.
  • I have a public key whose fingerprint is D09B CB3A 75ED 7A2D 909B 5A5E D00B C60F 5767 97B3

To claim this, I am signing this object:

View gist:705258418e7215e9ed9e
### Keybase proof
I hereby claim:
* I am jlleblanc on github.
* I am jlleblanc (https://keybase.io/jlleblanc) on keybase.
* I have a public key whose fingerprint is 3622 6D6B DEE2 BA99 E058 C85D ADD2 7B9D 8C28 288A
To claim this, I am signing this object:
View gist:6285111
var browserify = require('browserify-middleware');
var express = require('express');
server = express();
// Setup scripts/targets middleware.
server.use('/scripts', browserify('../src/scripts'));
View setting_js_php.php
<?php
$options = array(
'loop' => false,
'autoSlide' => true,
'dispItems' => 3,
// continue this array with everything you want to set
);
@jlleblanc
jlleblanc / gist:2960546
Created Jun 20, 2012
What more error reporting do you need?
View gist:2960546
<?php
// Save the user
if (!$model->save($data))
{
print 'crap!';
die();
}
@jlleblanc
jlleblanc / gist:2926803
Created Jun 13, 2012
Using JImage to create square profile pictures in two sizes, regardless of the original's orientation
View gist:2926803
<?php
$image = new JImage('/path/to/original.jpg');
$height = $image->getHeight();
$width = $image->getWidth();
if ($height > $width) {
$crop_square = $width;
$crop_top = ($height - $width) / 2;
View gist:2252372
SELECT a.id, a.title, a.alias, a.title_alias, a.introtext, a.checked_out, a.checked_out_time, a.catid, a.created, a.created_by, a.created_by_alias, CASE WHEN a.modified = 0 THEN a.created ELSE a.modified END as modified, a.modified_by, uam.name as modified_by_name,CASE WHEN a.publish_up = 0 THEN a.created ELSE a.publish_up END as publish_up,a.publish_down, a.images, a.urls, a.attribs, a.metadata, a.metakey, a.metadesc, a.access, a.hits, a.xreference, a.featured, LENGTH(a.fulltext) AS readmore,CASE WHEN badcats.id is not null THEN 0 ELSE a.state END AS state,c.title AS category_title, c.path AS category_route, c.access AS category_access, c.alias AS category_alias,CASE WHEN a.created_by_alias > ' ' THEN a.created_by_alias ELSE ua.name END AS author,ua.email AS author_email,parent.title as parent_title, parent.id as parent_id, parent.path as parent_route, parent.alias as parent_alias,ROUND(v.rating_sum / v.rating_count, 0) AS rating, v.rating_count as rating_count,c.published, CASE WHEN badcats.id is null THEN
You can’t perform that action at this time.