Skip to content

Instantly share code, notes, and snippets.

@stevepiercy
stevepiercy / git_install_guide.md
Created June 18, 2012 13:28
git_install_guide.md

How to install and set up git with GitHub

For information of how to install and set up git to work with GitHub, please visit the following link.

@stevepiercy
stevepiercy / egit_install_guide.md
Created June 19, 2012 10:37
egit_install_guide.md

Still Testing EGit Installation Guide Trash Me!!!!

EGit is a plugin to use git within any Eclipse-based IDE, including Lasso Lab.

@stevepiercy
stevepiercy / database.inc
Created June 22, 2012 09:40
fix for clear record locks
if: (self -> 'lockfield') != '';
(self -> 'lockvalue')=(field: (self -> 'lockfield'));
(self -> 'lockvalue_encrypted')=(encrypt_blowfish: (field: (self -> 'lockfield')), -seed=(self -> 'lock_seed'));
/if;
@stevepiercy
stevepiercy / hello.py
Created January 4, 2014 11:37
Hello Pyramid - A simple single-file web application using the Pyramid framework
from wsgiref.simple_server import make_server
from pyramid.config import Configurator
from pyramid.response import Response
def hello_world(request):
return Response('<h1>Hello World!</h1>')
if __name__ == '__main__':
@stevepiercy
stevepiercy / views-default.py
Last active February 28, 2016 20:36
if user requests to add_page that already exists, redirect to edit_page
import cgi
import re
from docutils.core import publish_parts
from pyramid.httpexceptions import HTTPFound
from pyramid.view import view_config
from ..models import Page
# regular expression used to find WikiWords
@stevepiercy
stevepiercy / routes.py
Last active February 28, 2016 21:52
refactor check for existing page from view to new_page_factory in authorization step
from pyramid.httpexceptions import (
HTTPNotFound,
HTTPFound,
)
from pyramid.security import (
Allow,
Everyone,
)
from .models import Page
@stevepiercy
stevepiercy / examples.lasso
Created August 2, 2016 06:36 — forked from jasonhuck/examples.lasso
Lasso 8.x wrapper for Mailchimp API v3
[//lasso
library('mailchimp.lasso');
// create a new mailchimp instance
// NOTE: -verifypeer worked fine for me on Linux, but not Windows
var('mc') = mailchimp( -key='{YOUR_MAILCHIMP_API_KEY}', -version=3.0, -verifypeer=false);
// get all campaigns
$mc->get('/campaigns');
@stevepiercy
stevepiercy / blowfish-demo.lasso
Created January 23, 2017 22:06
A failed attempt to demonstrate the knop_seed and blowfish_encrypt bug
<?lasso
// Demo of blowfish issue
define knop_seedbug => {
local('seed'= string( server_ip) + string( server_name) + response_localpath)
#seed -> removetrailing(response_filepath)
return #seed
}
define knop_blowfishbug => type {
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Sortable Demo</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>
</head>
<body>
<!-- Simple List -->
@stevepiercy
stevepiercy / pyvenvex.py
Last active November 7, 2017 21:45 — forked from vsajip/pyvenvex.py
A script which demonstrates how to extend Python 3.3's EnvBuilder, by installing setuptools and pip in created venvs. This functionality is not provided as an integral part of Python 3.3 because, while setuptools and pip are very popular, they are third-party packages.The script needs Python 3.3 or later; invoke it using"python pyvenvex.py -h"fo…
#
# Copyright (C) 2013 Vinay Sajip. New BSD License.
#
import os
import os.path
from subprocess import Popen, PIPE
import sys
from threading import Thread
from urllib.parse import urlparse
from urllib.request import urlretrieve