This file contains 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 | |
a=0 | |
while [ $a -lt <totalPromoCodes> ] | |
do | |
curl -s https://api.stripe.com/v1/promotion_codes \ | |
-u <apiKey>: \ | |
-d coupon=<code> \ | |
-d max_redemptions=1 | jq ".code" |
This file contains 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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "../utils/Context.sol"; | |
/** | |
* @dev Contract module which provides a basic access control mechanism, where | |
* there is an account (an owner) that can be granted exclusive access to | |
* specific functions. |
This file contains 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
# Download and unpack distribution | |
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2 | |
tar xf phantomjs-1.9.7-linux-x86_64.tar.bz2 | |
# copy binary | |
cd phantomjs-1.9.7-linux-x86_64 | |
cp bin/phantomjs /usr/local/bin | |
cd .. | |
rm -rf phantomjs-1.9.7-linux-x86_64 |
This file contains 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
App.directive 'requiredMultiple', -> | |
isEmpty = (value) -> | |
angular.isUndefined(value) || (angular.isArray(value) && value.length == 0) || value == '' || value == null || value != value | |
require: '?ngModel', | |
link: (scope, elm, attr, ctrl) -> | |
return unless ctrl | |
attr.required = true # force truthy in case we are on non input element | |
validator = (value) -> |
This file contains 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 Rack::Static, | |
################### | |
# Regular expression to include all pages. | |
# You could also write something like ["index.html", "about_us.html"] | |
################### | |
:urls => [/./], | |
:root => "index.html" |