This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script> | |
| var data | |
| var formId = 'form' | |
| function drawForm() { | |
| if (!data) return | |
| var outputEl = document.getElementById(formId); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function exportSpreadsheet() { | |
| //All requests must include id in the path and a format parameter | |
| //https://docs.google.com/spreadsheets/d/{SpreadsheetId}/export | |
| //FORMATS WITH NO ADDITIONAL OPTIONS | |
| //format=xlsx //excel | |
| //format=ods //Open Document Spreadsheet | |
| //format=zip //html zipped | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| ENV_PATH="$(dirname "$(dirname "$(which pip)")")" | |
| SYSTEM_VIRTUALENV="$(which -a virtualenv|tail -1)" | |
| BAD_ENV_PATHS="/usr/local" | |
| echo "Ensure the root of the broken virtualenv:" | |
| echo " $ENV_PATH" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| module.exports = function (grunt) { | |
| grunt.initConfig({ | |
| pkg: grunt.file.readJSON('package.json'), | |
| usebanner: { | |
| options: { | |
| banner: '/*!\n * <%= pkg.title || pkg.name %>\n * <%= pkg.description%>\n * Version <%= pkg.version%>\n * Compiled <%= grunt.template.today("dddd, mmmm dS, yyyy, h:MM:ss TT") %>\n */\n', | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * script to export data in all sheets in the current spreadsheet as individual csv files | |
| * files will be named according to the name of the sheet | |
| * author: Michael Derazon | |
| */ | |
| function onOpen() { | |
| var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
| var csvMenuEntries = [{name: "export as csv files", functionName: "saveAsCSV"}]; | |
| ss.addMenu("csv", csvMenuEntries); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Sometimes you need to move your existing git repository | |
| # to a new remote repository (/new remote origin). | |
| # Here are a simple and quick steps that does exactly this. | |
| # | |
| # Let's assume we call "old repo" the repository you wish | |
| # to move, and "new repo" the one you wish to move to. | |
| # | |
| ### Step 1. Make sure you have a local copy of all "old repo" | |
| ### branches and tags. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Functions ============================================== | |
| # return 1 if global command line program installed, else 0 | |
| # example | |
| # echo "node: $(program_is_installed node)" | |
| function program_is_installed { | |
| # set to 1 initially | |
| local return_=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // URL for Jira's REST API for issues | |
| var getIssueURL = "https://[Your Jira host]/rest/api/2/issue/"; | |
| // Personally I prefer the script to handle request failures, hence muteHTTPExceptions = true | |
| var fetchArgs = { | |
| contentType: "application/json", | |
| headers: {"Authorization":"Basic [Your BASE64 Encoded user:pass]"}, | |
| muteHttpExceptions : true | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <form id="loginForm" method="post" action="${request.route_url('login')}"> | |
| <input type="hidden" name="csrf_token" value="${request.session.get_csrf_token()}"/> | |
| <fieldset class="concise"> | |
| <metal:field tal:define="name 'came_from'" use-macro="snippets['hidden']"/> | |
| <metal:field tal:define="name 'login'" use-macro="snippets['text']"/> | |
| <metal:field tal:define="name 'password'" use-macro="snippets['password']"/> | |
| </fieldset> | |
| <div class="buttonBar"> | |
| <button type="submit" class="default" i18n:translate="">Login</button> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Public Domain, i.e. feel free to copy/paste | |
| # Considered a hack in Python 2 | |
| import inspect | |
| def caller_name(skip=2): | |
| """Get a name of a caller in the format module.class.method | |
| `skip` specifies how many levels of stack to skip while getting caller | |
| name. skip=1 means "who calls me", skip=2 "who calls my caller" etc. |
NewerOlder