Skip to content

Instantly share code, notes, and snippets.

@AdelMahjoub
AdelMahjoub / main.lua
Created April 10, 2018 19:22
Sound Transition Lua / Love2D
local snd = {}
snd.data = {
{ src = "/assets/sounds/cool.mp3", mode = "stream" },
{ src = "/assets/sounds/techno.mp3", mode = "stream" }
}
snd.tracks = {}
snd.current = nil
snd.timer = {}
snd.timer.delay = 0.2
snd.timer.elapsed = 0
@AdelMahjoub
AdelMahjoub / combinations.js
Created July 26, 2017 00:06 — forked from axelpale/combinations.js
JavaScript functions to calculate combinations of elements in Array.
/**
* Copyright 2012 Akseli Palén.
* Created 2012-07-15.
* Licensed under the MIT license.
*
* <license>
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
* (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
@AdelMahjoub
AdelMahjoub / apache rewrite rule
Created May 9, 2017 14:13 — forked from santthosh/apache rewrite rule
Apache config for SPA's
# To be inside the /Directory
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>