Skip to content

Instantly share code, notes, and snippets.

@machristie
machristie / setup.py
Created February 3, 2022 20:36
javascript install in python setup.py
import distutils
import os
import subprocess
import setuptools
from setuptools.command.develop import develop
from setuptools.command.install import install
def build_js():
-----BEGIN CERTIFICATE-----
MIIF+TCCA+GgAwIBAgIQRyDQ+oVGGn4XoWQCkYRjdDANBgkqhkiG9w0BAQwFADCB
iDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0pl
cnNleSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNV
BAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTQx
MDA2MDAwMDAwWhcNMjQxMDA1MjM1OTU5WjB2MQswCQYDVQQGEwJVUzELMAkGA1UE
CBMCTUkxEjAQBgNVBAcTCUFubiBBcmJvcjESMBAGA1UEChMJSW50ZXJuZXQyMREw
DwYDVQQLEwhJbkNvbW1vbjEfMB0GA1UEAxMWSW5Db21tb24gUlNBIFNlcnZlciBD
QTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJwb8bsvf2MYFVFRVA+e
xU5NEFj6MJsXKZDmMwysE1N8VJG06thum4ltuzM+j9INpun5uukNDBqeso7JcC7v
@machristie
machristie / README.md
Created November 10, 2017 01:44
AutoRest generated Python client for CloudLaunch
@machristie
machristie / index.html
Created January 25, 2015 19:18
Child View Example // source http://emberjs.jsbin.com/yegaqu
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Child View Example</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.1/normalize.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v2.0.0.js"></script>
<script src="http://builds.emberjs.com/tags/v1.9.1/ember.js"></script>
<style id="jsbin-css">
@machristie
machristie / JSONUtil.cfc
Last active August 29, 2015 14:10
JSONUtil: starting with version 1.5, changes needed to work with CF 7
<!---
Copyright 2009 Nathan Mische
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@machristie
machristie / setup_changes.py
Last active August 29, 2015 14:05
Install Pillow on Mac OS X
#ZLIB_ROOT = None
brew_zlib_home = os.path.join(os.environ["BREW_HOME"], "opt", "zlib")
ZLIB_ROOT = os.path.join(brew_zlib_home, "lib"), os.path.join(brew_zlib_home, "include")
@machristie
machristie / bootstrap-pyvenv
Created January 22, 2013 02:45
A shell script to bootstrap a Python 3 virtual environment with distribute and pip.
#!/bin/sh
# Create Python virtual environment
pyvenv $1
# install distribute and pip
curl -O http://python-distribute.org/distribute_setup.py
$1/bin/python distribute_setup.py
$1/bin/easy_install pip
@machristie
machristie / gist:1073967
Created July 9, 2011 21:11
iframe Tweet Button example
<iframe id="tweet-button" allowtransparency="true" frameborder="0" scrolling="no"
src="http://platform.twitter.com/widgets/tweet_button.html?via=marcus_christie&amp;text=Replace%20Me&amp;count=horizontal"
style="width:110px; height:20px;"></iframe>
@machristie
machristie / gist:1073778
Created July 9, 2011 17:38
Update the tweet text of the iframe Tweet Button
function updateTweetButtonText(message) {
var tweetButton = document.getElementById('tweet-button');
tweetButton.src = tweetButton.src.replace(/&text=[^&]+/, "&text=" + encodeURIComponent(message) );
}