Skip to content

Instantly share code, notes, and snippets.

stevepiercy / ds->found_count
Last active Aug 29, 2015
How to use Lasso ds type to return the found count of a result set
View ds->found_count
local(d) = ds(::mysqlds,'localhost',::database.table,'username','password')
local(sql) = `
FROM table
WHERE id > 0;
local(rs) = #d->sql(#sql)->results
if(#rs->size > 0) => {
if (#rs->get(1)->found_count) => {^
'at least 1 record'
View Lasso_icalendar.lasso
2014-10-08 JC Added to Gist
Method to ensure that the given string complies to the icalendar requirements that no row inside an icalendar object is longer than 75 octets (bytes)
View patch_email_send.lasso
// [Email_Send2]
// This tag is a drop-in replacement for [Email_Send]. It uses [Email_Compose] on the back-end in order
// to create the message to be sent.
* Replaces subject line that is encoded word by word with a subject line that is encoded as a whole.
View wrp.lasso
Quick way to grap a web_request param
2014-10-08 JC Added to Gist
2014-10-08 JC Added separate methods for queryparams and postparams
2014-08-24 JC Rewrite of the wrp method once again. This time with code suggested by Brad Lindsay in a lassotalk thread. Introduces the param -all
2014-08-22 JC Complete rewrite to produce leaner and more reliable code. Arrays are now returned as staticarrays
View jc_session.lasso
Lasso 9 type to handle cookie based sessions
Requires that Ke Carltons DS is installed
Before first use create the needed table and set the proper values for
stevepiercy / session_cookie.lasso
Last active Aug 29, 2015
Lasso code that demonstrates the use of sessions and cookies
View session_cookie.lasso
View oauth_lib.lasso
define oauth_consumer_key => 'key'
define oauth_consumer_secret => 'secret'
define oauth_request_token => 'requestkey'
define oauth_request_secret => 'requestsecret'
define oauth_access_token => 'accesskey'
define oauth_access_secret => 'accesssecret'
define oauth_realm => ''
define oauth_request_endpoint => {return ''}
define oauth_access_endpoint => ''
stevepiercy / webpack.config.js
Created Aug 14, 2015
webpack.config.js in attempt to integrate Bootswatch theme Readable
View webpack.config.js
var path = require('path');
var webpack = require('webpack');
var HtmlwebpackPlugin = require('html-webpack-plugin');
var merge = require('webpack-merge');
var Clean = require('clean-webpack-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var pkg = require('./package.json');
var TARGET = process.env.TARGET;
stevepiercy / index.html
Last active Sep 18, 2015
bootstrap-datepicker - After cloning place index.html in the directory and load it
View index.html
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>Datepicker for Bootstrap</title>
<script src=""></script>
<link id="bs-css" href="" rel="stylesheet">
<link id="bsdp-css" href="dist/css/bootstrap-datepicker3.min.css" rel="stylesheet">
stevepiercy / readme.txt
Created Nov 20, 2011 — forked from paulherron/readme.txt
jQuery script to populate a specified input with a suggested slug. For example, if I write 'My Title' in a title field, it can populate the slug field with a suggestion of 'my_title'.
View readme.txt
Video demo at
By default it uses a title field ending in [title] or [name] as the source field, and a field ending in [slug] as the destination. This matches the naming conventions for a framework like CakePHP, i.e. <?php echo $form->input('title'); ?> outputs an input with a name of data[Model][title].
You can override the default source and destination fields by setting document.slugField and document.titleField in JavaScript beforehand:
document.titleField = "input[name$='[heading]']";
document.slugField = "input[name$='[url_safe_heading]']";