Skip to content

Instantly share code, notes, and snippets.

@chrislkeller
chrislkeller / import_json_appsscript.js
Last active December 27, 2024 01:01
Adds what amounts to an =ImportJSON() function to a Google spreadsheet... To use go to Tools --> Script Editor and add the script and save.
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@padicode
padicode / gist:5734456
Last active December 18, 2015 05:39
PadiAct Redirect on Subscribe
<script type="text/javascript">
window.nrlskOnEvent = function(padiact)
{
if (padiact.type=='subscribe')
{
window.location = "http://yourwebsite.com/newpage.html";
//change http://yourwebsite.com/newpage.html to the page you want to redirect when people subscribe
}
}
</script>
@mtowers
mtowers / README.md
Last active February 24, 2022 17:19
Google Analytics Website Visitor Count Widget for Dashing with OAuth2 Authentication
@padicode
padicode / gist:6115479
Last active December 20, 2015 10:30
PadiAct Subscribe JavaScript Hook
<script type="text/javascript">
window.nrlskOnEvent = function(padiact)
{
if (padiact.type=='subscribe')
{
// here should go the code that you want PadiAct to trigger when somebody subscribes
// the email address of the subscriber is available and url encoded: e.g. user%40gmail.com
// example:
console.log (padiact.email+' subscribed through PadiAct');
// available vars:
@willjohnson
willjohnson / README.md
Last active November 27, 2019 10:04 — forked from mtowers/README.md
Google Analytics Website Visitor Count Widget for Dashing with OAuth2 Authentication (multiple profiles)
@chrisatomix
chrisatomix / gist:6360730
Created August 28, 2013 00:22
Proof of concept Toggl API MultiRequest to load currently running timers.
<?php
/**
* Perform a multi-request to the Toggl API
* @param String $url The API URL you are requesting
* @param String $method HTTP Request Method (should be 'GET')
* @param Array $tokens An array of Toggl API Tokens and names
* @return Array An array of Time Entries
*/
function multiRequest($url, $method, $tokens) {
@miku
miku / withsqlite.py
Last active November 30, 2022 20:31
Simple sqlite3 context manager for Python.
#!/usr/bin/env python
import sqlite3
class dbopen(object):
"""
Simple CM for sqlite3 databases. Commits everything at exit.
"""
def __init__(self, path):
self.path = path
@xander-miller
xander-miller / README.md
Last active May 19, 2016 01:50
Ntile dashing widget. A Dashing numbers widget that puts your numbers in statistical context.

#Ntile Widget# A Dashing widget that shows numbers in statistical context. This widget is also available in a GitHub Repository.

Demo Dashboard Screenshot

##Description## A Dashing widget (and an associated job) that will take any set of timestamped data, divid that data by day (or any other unit of time) and compare those units of time, and displays the current day in statistical context of previous days. It currently has three modes of operation Quartile, Quintile and Percentile (hench 'N'tile). The code is designed to take in a variety of data sources. Examples include:

  • Display number of new users your app has attracted this week compared to previous weeks.
  • Display how many customer service tickets have been closed by an individual employee today in the cont
@padicode
padicode / gist:6761479
Last active December 24, 2015 07:09
PadiAct Naked Action HTML
<div class="padiOverlay" style="display: block;">
<div class="padiPop4Wrap" style="display: block;">
<div class="padiPop4Overlay" >
<div class="padiPopupContent" > <a href="#" class="padiClose" title="Close" style="display:block;" >&times;</a>
<div class="padiContent" style="display:block">
<h1 class="padiTitle">
<!-- any TEXT can go from here -->
@robertmarsal
robertmarsal / README.md
Last active March 20, 2022 02:26 — forked from mtowers/README.md
Google Analytics Real Time Visitors Widget for Dashing with OAuth2 Authentication