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 | |
| # Checks if images referenced on products in the DB exist on disc and checks that they are not smaller than 300x300 px. | |
| # Runnable in bash. | |
| # Requirements. | |
| # apk add bash mysql-client imagemagick | |
| # I also had a regexp to get only _1 _2 etc in the query but have removed it now. | |
| # AND g.value REGEXP '_[0-9].(jpg|png)$' | |
| # You can also do a where condition such as WHERE e.sku IN ('A', 'B') |
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
| using UnityEditor; | |
| using UnityEngine; | |
| namespace UnityTemplateProjects.Misc | |
| { | |
| /// <summary> | |
| /// Inherit from this base class to create a singleton. | |
| /// e.g. public class MyClassName : Singleton<MyClassName> {} | |
| /// </summary> | |
| public class Singleton<T> : MonoBehaviour where T : MonoBehaviour |
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 | |
| # Author: Liam Mitchell | |
| # Purpose: Wrap a cron command and ping HealthChecks.io | |
| HEALTHCHECKS_UUID=$1 | |
| # Check number of arguments is at least 1 for the Health Checks UUID. | |
| if [ -z "$1" ]; | |
| then | |
| echo "Usage: `basename $0` HEALTHCHECKS_UUID command args..." | |
| exit 65 |
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 | |
| // Thanks to: https://laracasts.com/discuss/channels/general-discussion/add-content-length-header-on-views | |
| // In relation to a bug for graphql code generator in an upstream dependency, I needed to add a Content-Length header. | |
| // Temporary workaround for this. | |
| // See: https://github.com/dotansimha/graphql-code-generator/issues/7934 | |
| // See: https://github.com/nodejs/undici/issues/1414 | |
| // https://github.com/nodejs/undici/issues/1490 | |
| namespace App\Http\Middleware; |
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
| // This code is distributed under the MIT License. | |
| // Copyright (c) 2018 Felix Angelov. | |
| // You can find the original at https://github.com/felangel/bloc. | |
| import 'package:flutter/material.dart'; | |
| import 'package:flutter_bloc/flutter_bloc.dart'; | |
| import 'dart:math'; | |
| var rng = Random(); |
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
| // This example will use Restartable event transformer and cancel/ignore previous events that are emitted only accepting the latest event. | |
| // Can kind of see this in console and added a random color on build of text. | |
| // This code is distributed under the MIT License. | |
| // Copyright (c) 2018 Felix Angelov. | |
| // You can find the original at https://github.com/felangel/bloc. | |
| import 'package:flutter/material.dart'; | |
| import 'package:flutter_bloc/flutter_bloc.dart'; | |
| // import 'package:bloc_concurrency/bloc_concurrency.dart'; (Unsupported import on DartPad) so I'll just copy it below. |
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
| // https://www.youtube.com/watch?v=LcmT38ZPTjg | |
| var _STAGE_ = 0; | |
| var _FAIL_COUNT_ = 0; | |
| var __INTERVAL__ = setInterval(function() { | |
| let iframe = null; | |
| let blockAdBtn = null; | |
| let continueElement = null; | |
| let closeBtn = null; | |
| let infoBtn = null; | |
| if (_STAGE_ > 0) { |
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
| Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
OlderNewer