Skip to content

Instantly share code, notes, and snippets.

View zakaria-sarmini's full-sized avatar
💭
compiling...

Zakaria Sarmini zakaria-sarmini

💭
compiling...
  • the key technology GmbH
  • Berlin
View GitHub Profile
@zakaria-sarmini
zakaria-sarmini / RevealingShader.shader
Created July 4, 2021 18:37 — forked from runewake2/RevealingShader.shader
Shader that only renders when inside a light cone.
// Developed as a part of World of Zero: https://youtu.be/b4utgRuIekk
Shader "Custom/RevealingShader" {
Properties {
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_Glossiness ("Smoothness", Range(0,1)) = 0.5
_Metallic ("Metallic", Range(0,1)) = 0.0
_LightDirection("Light Direction", Vector) = (0,0,1,0)
_LightPosition("Light Position", Vector) = (0,0,0,0)
@zakaria-sarmini
zakaria-sarmini / .htaccess
Created August 14, 2020 18:56 — forked from dammyammy/.htaccess
Laravel Optimal HTACCESS FILE
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>
RewriteEngine On
@zakaria-sarmini
zakaria-sarmini / .htaccess
Created June 12, 2019 10:36 — forked from morcegon/.htaccess
.htaccess optimized for laravel
# Apache configuration file
# httpd.apache.org/docs/2.2/mod/quickreference.html
# Note .htaccess files are an overhead, this logic should be in your Apache
# config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html
# Techniques in here adapted from all over, including:
# Kroc Camen: camendesign.com/.htaccess
# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
# Sample .htaccess file of CMS MODx: modxcms.com
@zakaria-sarmini
zakaria-sarmini / MyController.php
Created June 5, 2019 12:38 — forked from arnekolja/MyController.php
TYPO3, Extbase: Simple JsonView usage
<?php
/* This is tested with 6.2.9 only */
namespace MY\Extension\Controller;
class MyController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
private $ajaxPageType = 133799;
/**
@zakaria-sarmini
zakaria-sarmini / VertMinusCameraFOV.cs
Created July 1, 2018 14:37 — forked from coastwise/VertMinusCameraFOV.cs
VERT- Field of view scaling for Unity3D cameras.
using UnityEngine;
using System.Collections;
/**
* This class attempts to force VERT- Field of view scaling.
* By default, Unity uses the HOR+ technique.
*
* http://en.wikipedia.org/wiki/Field_of_view_in_video_games#Scaling_methods
*/
@zakaria-sarmini
zakaria-sarmini / I18n.cs
Created July 1, 2018 11:49 — forked from ditzel/I18n.cs
Internationalization - See code comments for usage
/*
* Internationalization
*
* Author: Daniel Erdmann
*
* 1. Add this File to you Project
*
* 2. Add the language files to the folder Assets/Resources/I18n. (Filesnames: en.txt, es.txt, pt.txt, de.txt, and so on)
* Format: en.txt: es.txt:
* =============== =================
@zakaria-sarmini
zakaria-sarmini / client.js
Created June 14, 2018 11:54 — forked from crtr0/client.js
A simple example of setting-up dynamic "rooms" for socket.io clients to join
// set-up a connection between the client and the server
var socket = io.connect();
// let's assume that the client page, once rendered, knows what room it wants to join
var room = "abc123";
socket.on('connect', function() {
// Connected, let's sign-up for to receive messages for this room
socket.emit('room', room);
});
@zakaria-sarmini
zakaria-sarmini / EasingFunctions.cs
Created May 26, 2018 11:05 — forked from cjddmut/EasingFunctions.cs
Easing Functions for Unity3D
using UnityEngine;
/*
* Created by C.J. Kimberlin (http://cjkimberlin.com)
*
* The MIT License (MIT)
*
* Copyright (c) 2015
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
using GameSparks.Core;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GSDataHelpers {
/** Converts a serializable object into GameSparks compatible GSData. */
public static GSData ObjectToGSData(object obj) {
// LoadingScreenManager
// --------------------------------
// built by Martin Nerurkar (http://www.martin.nerurkar.de)
// for Nowhere Prophet (http://www.noprophet.com)
//
// Licensed under GNU General Public License v3.0
// http://www.gnu.org/licenses/gpl-3.0.txt
using UnityEngine;
using UnityEngine.UI;