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
| // Description: This details how to make a CORS XHR request to a remote HTML resource with credentials, using jquery | |
| // Origin website: https://www.origin.example/hello.html | |
| // Remote resource: https://www.remote.example/world.html | |
| // You can test this locally by configuring your local web server to allow cross origin requests from | |
| // google.com. Then you can run the snippet below in devtools from the google homepage. | |
| // Remote resource prerequisites: | |
| // |
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
| REM What is the working directory of this script? | |
| REM Reports will be relative to that. | |
| if not exist reports echo "no" && mkdir reports | |
| cd reports | |
| type nul > report.xml | |
| REM this is probably the source of your problem | |
| REM echo ^<?xml version="1.0" encoding="UTF-8"?> >> report.xml |
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
| <div class="row"> | |
| <div class="col">8/27 9:21 AM</div> | |
| <!-- calculateHeight(...) returns something like '112px' --> | |
| <div class="col" ng-style="{ height: calculateHeight(statusStart, statusStop) }"> | |
| Prep Name (Prep) | |
| Screens Burned | |
| </div> | |
| <div class="col"> | |
| <!-- placeholder for sub-status changes, like printing statuses --> | |
| </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
| // Playing with overloads and stricter typing in JS -- https://github.com/cmawhorter/tiptop | |
| var fn = require('../lib/tiptop'); | |
| function MyObj() { | |
| } | |
| MyObj.prototype.save = fn.overloaded( | |
| function() { |
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
| @echo off | |
| REM This will fail with "the input line is too long" if you have a lot of files... maybe? | |
| REM Don't know why, but I think the solution is breaking the body of the for () into a separate | |
| REM batch. But... IDGAF. | |
| echo Starting... | |
| for %%i in (*.*) do ( | |
| echo Looking at... %%~di%%~pi%%~ni%%~xi |
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
| var fs = require('fs'); | |
| var path = require('path'); | |
| var async = require('async'); | |
| var request = require('request'); | |
| var tasks = {}; | |
| var json = { /* your records */ }; |
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
| @echo off | |
| REM You may need to add `cd %WORKSPACE%` in the jenkins project prior to | |
| REM calling this script. I have it in mine and didn't test without. | |
| REM Correct paths to respective applications as-needed | |
| SET PATH=%PATH%;C:\Program Files (x86)\nodejs;C:\Program Files (x86)\Git\bin;%AppData%\npm;C:\Ruby200-x64\bin | |
| echo Installing or updating bower... |
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
| // Simple proxy/forwarding server for when you don't want to have to add CORS during development. | |
| // Usage: node proxy.js | |
| // Open browser and navigate to http://localhost:9100/[url] | |
| // Example: http://localhost:9100/http://www.google.com | |
| // This is *NOT* for anything outside local development. It has zero error handling among other glaring problems. | |
| // This started as code I grabbed from this SO question: http://stackoverflow.com/a/13472952/670023 |
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
| // see mawhorter.net for full post | |
| // Put this in an after:render event handler. | |
| // Be warned: Ripped out of working code and renamed variables without testing. | |
| var fabricMain = new fabric.Canvas('main') | |
| , fabricThumb = new fabric.Canvas('screenshot') | |
| , ctxThumbnail = $('canvas#thumbnail')[0].getContext('2d'); |
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
| <?php | |
| // Stampr API - Create a Batch for Testing | |
| require 'vendor/autoload.php'; | |
| require 'src/Stampr/Stampr.php'; | |
| $stampr_login = "[email protected]"; | |
| $stampr_password = "your.stampr.password"; | |
| $endpoint = "https://stam.pr/api"; |