Skip to content

Instantly share code, notes, and snippets.

🐕
Manners Maketh Man

Alexandru Bucur CoolGoose

🐕
Manners Maketh Man
Block or report user

Report or block CoolGoose

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@CoolGoose
CoolGoose / webpack.config.js
Created Sep 23, 2018
mini css extract scss issue
View webpack.config.js
const path = require("path");
const merge = require("webpack-merge");
const VueLoaderPlugin = require("vue-loader/lib/plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
const WebpackBarPlugin = require("webpackbar");
const outputFolder = path.resolve(__dirname, "../public_html/assets");
@CoolGoose
CoolGoose / ApiResponseHelper.cs
Created May 1, 2018
Simple JSON API ASP .NET Core Error handling class
View ApiResponseHelper.cs
using Newtonsoft.Json.Linq;
using System.Linq;
using Microsoft.AspNetCore.Mvc.ModelBinding;
namespace Craidd.Helpers
{
/// <summary>
/// Manage JSON Api response
/// </summary>
public class ApiResponseHelper : IApiResponseHelper
@CoolGoose
CoolGoose / cleanup_phone_photos.ps
Last active Dec 30, 2017
Move your camera roll pictures in folders, i've liked year / year-month with month having leading 0 (originally at https://www.thomasmaurer.ch/2015/03/move-files-to-folder-sorted-by-year-and-month-with-powershell/)
View cleanup_phone_photos.ps
# Get the files which should be moved, without folders
$files = Get-ChildItem 'X:\OneDrive\Pictures\Camera Roll' -Recurse | where {!$_.PsIsContainer}
# List Files which will be moved
$files
# Target Filder where files should be moved to. The script will automatically create a folder for the year and month.
$targetPath = 'X:\OneDrive\Photos'
foreach ($file in $files) {
@CoolGoose
CoolGoose / generate_month_diff.php
Last active Feb 28, 2017
Get an array of months between two dates in PHP for table based reports :)
View generate_month_diff.php
<?php
generateTableMappings($raw_start_date, $raw_end_date)
{
$start_date = \Datetime::createFromFormat('Y-m', $raw_start_date);
$end_date = \Datetime::createFromFormat('Y-m', $raw_end_date);
$iteration_date = clone $start_date;
$tables = [];
while ($iteration_date <= $end_date) {
View GeneratorCommand.php
<?php
namespace Grav\Plugin\Console;
use Grav\Console\ConsoleCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
/**
* Class GeneratorCommand
*
You can’t perform that action at this time.