Skip to content

Instantly share code, notes, and snippets.

View dacanizares's full-sized avatar

Daniel Cañizares Corrales dacanizares

View GitHub Profile

start

  • Terry Pratchett $t:
    heya.

  • Tom Bombadil:

How to add a blur filter without white borders

  1. Use the following css:

    .blur-image::before {
      content: "";
      position: absolute;
      z-index: 2;

width: 100%;

@dacanizares
dacanizares / MovementAIController.cpp
Last active October 29, 2023 20:11
Sample AI Controller - GetRandomReachablePointInRadius - UE4
#include "Test/MovementAIController.h"
#include "Runtime/Engine/Classes/Kismet/GameplayStatics.h"
#include "AI/NavigationSystemBase.h"
#include "NavigationSystem.h"
void AMovementAIController::BeginPlay()
{
Super::BeginPlay();
#pragma once
#include "CoreMinimal.h"
#include "AIController.h"
#include "MovementAIController.generated.h"
UCLASS()
class PROJECT999_API AMovementAIController : public AAIController
{
@dacanizares
dacanizares / observer-simple.js
Created October 27, 2019 03:12
Observer pattern Straightforward implementation
// Observer pattern
// Straightforward implementation
class Notification {
constructor() {
this.subs = [];
}
subscribeMe = (subscriptor) => {
this.subs.push(subscriptor);
@dacanizares
dacanizares / web.config
Created April 3, 2019 20:57
Azure ReactJS web config
<?xml version="1.0"?>
<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="DisableCache"/>
</staticContent>
<rewrite>
<rules>
<rule name="Pushstate Routes" stopProcessing="true">
<match url=".*"/>
@dacanizares
dacanizares / deploy.cmd
Created April 3, 2019 20:56
Azure kudu deploy ReactJS, create-react-app compatible
@if "%SCM_TRACE_LEVEL%" NEQ "4" @echo off
:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.9
:: ----------------------
:: Prerequisites
:: -------------
@dacanizares
dacanizares / json-server-azure-example-packages.json
Created April 3, 2019 20:49
Packages.json example for deploying on Azure using Kudu
{
"name": "PROJECTNAME",
"version": "1.0.0",
"description": "",
"main": "index.js",
"dependencies": {
"json-server": "^0.14.2"
},
"engines": {"node": "^10.14.1"},
"devDependencies": {},
@dacanizares
dacanizares / redux_sample_in_one_file.js
Created March 22, 2019 17:17
A short and condensed example using ReactJS and Redux
import React, { Component } from 'react';
import { render } from 'react-dom';
import { createStore, combineReducers } from 'redux'
import { Provider, connect } from 'react-redux'
import Hello from './Hello';
import './style.css';
const CHANGENAME = 'CHANGENAME'
const action = (name) => ({
type: CHANGENAME,
@dacanizares
dacanizares / Flat.js
Last active February 18, 2019 15:32
How to Flat nested arrays on Javascript
"use strict";
/**
* Flats an array of arrays
* @param {Array} element
*/
const Flat = (element) => {
if (!Array.isArray(element))
return element