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
| ;; Inspired by George Jahad's version: http://georgejahad.com/clojure/debug-repl.html | |
| (defmacro local-bindings | |
| "Produces a map of the names of local bindings to their values." | |
| [] | |
| (let [symbols (map key @clojure.lang.Compiler/LOCAL_ENV)] | |
| (zipmap (map (fn [sym] `(quote ~sym)) symbols) symbols))) | |
| (declare *locals*) | |
| (defn eval-with-locals |
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
| // Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
| // Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
| var FORMAT_ONELINE = 'One-line'; | |
| var FORMAT_MULTILINE = 'Multi-line'; | |
| var FORMAT_PRETTY = 'Pretty'; | |
| var LANGUAGE_JS = 'JavaScript'; | |
| var LANGUAGE_PYTHON = 'Python'; |
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
| # source: http://st-on-it.blogspot.com/2010/01/how-to-move-folders-between-git.html | |
| # First of all you need to have a clean clone of the source repository so we didn't screw the things up. | |
| git clone git://server.com/my-repo1.git | |
| # After that you need to do some preparations on the source repository, nuking all the entries except the folder you need to move. Use the following command | |
| git filter-branch --subdirectory-filter your_dir -- -- all | |
| # This will nuke all the other entries and their history, creating a clean git repository that contains only data and history from the directory you need. If you need to move several folders, you have to collect them in a single directory using the git mv command. |
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
| { | |
| "translatorID":"04623cf0-313c-11df-9aae-0800200c9a66", | |
| "translatorType":2, | |
| "label":"ZotSelect Link", | |
| "creator":"Scott Campbell, Avram Lyon, Nathan Schneider", | |
| "target":"html", | |
| "minVersion":"2.0", | |
| "maxVersion":"", | |
| "priority":200, | |
| "inRepository":false, |
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/sh | |
| ### | |
| # SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
| # For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
| ### | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
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
| #################################################################### | |
| # | |
| # All Code and Comments Below (except code provided by Boris Mayer) are | |
| # Copyright Marc Schwartz | |
| # e-mail: marc_schwartz@me.com | |
| # This code is made available under the GNU Public License V2.0 | |
| # This is free software and comes with ABSOLUTELY NO WARRANTY. | |
| # | |
| #################################################################### |
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
| //return an array of objects according to key, value, or key and value matching | |
| function getObjects(obj, key, val) { | |
| var objects = []; | |
| for (var i in obj) { | |
| if (!obj.hasOwnProperty(i)) continue; | |
| if (typeof obj[i] == 'object') { | |
| objects = objects.concat(getObjects(obj[i], key, val)); | |
| } else | |
| //if key matches and value matches or if key matches and value is not passed (eliminating the case where key matches but passed value does not) | |
| if (i == key && obj[i] == val || i == key && val == '') { // |
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
| data_sets <- c("mtcars", "morley", "rock") | |
| shinyServer(function(input, output) { | |
| # Drop-down selection box for which data set | |
| output$choose_dataset <- renderUI({ | |
| selectInput("dataset", "Data set", as.list(data_sets)) | |
| }) | |
| # Check boxes |
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
| Each existing unread and subsequent new emails after the script is started are | |
| passed as Mail objects to "process_email" function.Function header is provided | |
| but processing implementation is left to the user. Error logs are currently sent | |
| to a rotating log file (in the same directory as the script) and to STDOUT. | |
| Instead of polling or checking the server for new emails every now and then, | |
| IMAP IDLE check is utilized. Ensure that the IMAP server supports IDLE command | |
| and allows at least 5 minutes of idling*** and uses the default ports for this | |
| script to work. Tested to work with Gmail and default installations of MS | |
| Exchange Server. |
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 lang="en-GB"> | |
| <head> | |
| <title>Simple JavaScript pagination</title> | |
| <meta charset="UTF-8"> | |
| <style> | |
| div{ | |
| position: relative; | |
| } | |
| #stage{ |
OlderNewer