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
| // Parse an url and get query parameters | |
| const getParams = function (url) { | |
| const params = {} | |
| const parser = document.createElement('a') | |
| parser.href = url | |
| const query = parser.search.substring(1) | |
| const vars = query.split('&') | |
| for (let i = 0; i < vars.length; i++) { | |
| let pair = vars[i].split('=') | |
| params[pair[0]] = decodeURIComponent(pair[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
| REACT_APP_FB_PIXEL_ID= |
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 | |
| # You don't need some other library to upload to S3 -- shell works perfectly fine | |
| # Based on a modified script from here https://gist.github.com/chrismdp/6c6b6c825b07f680e710 and here http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
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
| # You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
| # This is how I upload my new Sol Trader builds (http://soltrader.net) | |
| # Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
| S3KEY="my aws key" | |
| S3SECRET="my aws secret" # pass these in | |
| function putS3 | |
| { | |
| path=$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
| function selectedItemsToCSV() { | |
| let items = [...document.querySelectorAll('.ynab-grid-body-row.is-checked')].map(item => { | |
| return { | |
| Date: item.querySelector('.ynab-grid-cell-date').innerText.trim(), | |
| Payee: item.querySelector('.ynab-grid-cell-payeeName').innerText.trim(), | |
| // subCategoryName: item.querySelector('.ynab-grid-cell-subCategoryName').innerText.trim(), | |
| Memo: item.querySelector('.ynab-grid-cell-memo').innerText.trim(), | |
| Inflow: (item.querySelector('.ynab-grid-cell-outflow').innerText.trim()).replace("$", "").replace(",", ""), | |
| Outflow: (item.querySelector('.ynab-grid-cell-inflow').innerText.trim()).replace("$", "").replace(",", "") | |
| } |
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
| cd ~ | |
| apt-get install -y software-properties-common python-software-properties && | |
| LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php && | |
| apt-get update && | |
| apt-get install -y php7.2 php7.2-cli php7.2-common php7.2-curl php7.2-gd php7.2-json php7.2-mbstring php7.2-intl php7.2-mysql php7.2-xml php7.2-zip php7.2-bcmath | |
| curl -sS https://getcomposer.org/installer -o composer-setup.php | |
| php composer-setup.php --install-dir=/usr/local/bin --filename=composer |
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 namespace App\Http\Middleware; | |
| use Closure; | |
| use Illuminate\Http\JsonResponse; | |
| /** | |
| * A middleware class responsible for converting incoming parameter keys to camel case. | |
| * | |
| * @package flugger/laravel-responder | |
| * @author Alexander Tømmerås <flugged@gmail.com> |
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 namespace App\Http\Serializers; | |
| use League\Fractal\Serializer\ArraySerializer; | |
| use League\Fractal\Pagination\PaginatorInterface; | |
| class SirenSerializer extends ArraySerializer | |
| { | |
| protected $baseUrl; | |
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
| copy(jQuery('.list-card-details').map(function(key, item) { | |
| jQuery(item).children('.list-card-title').children('span').remove() | |
| var title = jQuery(item).children('.list-card-title').text(); | |
| var points = jQuery(item).find('.badges .badge-points:not(.consumed)').text() | |
| title = "[" + points + "] " + title; | |
| return title; | |
| }).toArray().join('\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
| <?php | |
| /** | |
| * This service provider handles a few custom validation rules. | |
| * | |
| * PHP version 5.5.9 | |
| * @package Snipe-IT | |
| * @version v3.0 | |
| */ | |
| namespace App\Providers; |
NewerOlder