Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# Copyright (C) 2010 Samuel Abels.
#
# 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
#
# Unless required by applicable law or agreed to in writing, software
@clach04
clach04 / gist:1087666
Created July 17, 2011 15:02
markdown bullet demo for md2 issue 67
Demo a few different issues with bullet points
NOTE demo 1 is proabably a markdown "feature". The perl (online dingus)
version has the same behavior, i.e. copy.paste this into
<http://daringfireball.net/projects/markdown/dingus>
## 1 odd spacing (possibly caused by p tag?)
Workarounds:
Then he said, “The names Bod, James Bond.”
to be “me”
Spam, beans, spam – served every day
beans, spam, beans, — served every other day
@clach04
clach04 / pebble_time_colors.py
Created June 28, 2015 02:35
Contains Pebble Time Colors definitions suitable for conversion into any format. Example emits a standard HTML dropdown/select/option form of color names with the background set to the color.
# from http://developer.getpebble.com/tools/color-picker/
# http://developer.getpebble.com/assets/js/tools/color-dict.js
from pprint import pprint
def invert_colors(hex_color_str):
"""Convert 24-bit color hex str like f0f0f0 into inverted colors"""
@clach04
clach04 / hb_all_books_dl.js
Created February 15, 2017 19:52 — forked from graymouser/hb_all_books_dl.js
Humble bundle book bundles - download all books at once
/*
After purchasing a humble book bundle, go to your download page for that bundle.
Open a console window for the page and paste in the below javascript
*/
$('a').each(function(i){
if ($.trim($(this).text()) == 'MOBI') {
$('body').append('<iframe id="dl_iframe_'+i+'" style="display:none;">');
document.getElementById('dl_iframe_'+i).src = $(this).data('web');
}
});
@clach04
clach04 / hb_all_books_dl.js
Created February 15, 2017 19:52 — forked from graymouser/hb_all_books_dl.js
Humble bundle book bundles - download all books at once
/*
After purchasing a humble book bundle, go to your download page for that bundle.
Open a console window for the page and paste in the below javascript
*/
$('a').each(function(i){
if ($.trim($(this).text()) == 'EPUB') {
$('body').append('<iframe id="dl_iframe_'+i+'" style="display:none;">');
document.getElementById('dl_iframe_'+i).src = $(this).data('web');
}
});
@clach04
clach04 / README.md
Last active September 5, 2019 17:35
SQLPad with Actian X/Vector/Ingres

SQLPad with Actian X/Vector/Ingres

https://github.com/rickbergfalk/sqlpad/ is a web app for writing and running SQL queries and visualizing the results. It works well with Actian X/Vector/Ingres and is straightfoward to deploy.

Over view of Steps

These instructions were originally written for a version from 2018 https://github.com/clach04/sqlpad/tree/unixodbc_squashed/server/drivers - they have been tested with headrevs code from https://github.com/rickbergfalk/sqlpad/ with version 3.0.x 2019-09-05.

@clach04
clach04 / README.txt
Created December 21, 2018 19:18 — forked from zostay/README.txt
Google Authentication Workflow for Pebble Watchapps
None of the workflow examples given in the Google Authentication OAuth2 documentation
(https://developers.google.com/accounts/docs/OAuth2) handle what's needed for Pebble. I
basically had to mix the needs of a client-side application with an offline web application
to get what's needed and work within the restrictions of the Pebble JS toolkit.
The steps are as follows:
1. Setup a Client ID for Web Application on the Google Developer Console
2. On the configuration web pages, with SSL:
* In the configuration page, use JavaScript to retrieve a authorization code, which
@clach04
clach04 / README.md
Last active July 23, 2022 21:47 — forked from zeevro/README.md
Pebble SDK installation script
@clach04
clach04 / README.md
Last active February 5, 2020 07:40
pebble SDK 32-bit