Skip to content

Instantly share code, notes, and snippets.


Ahmad Naser ahmadnaser

View GitHub Profile
View JS and jQuery learning resources
JavaScript learning resources.
Starting point for those, who have already learned JS, but forgotten. Good article. Quite compact.
Question: what's the best learning source on JS. Some answers.
View remove dash from joomla title
in the end </head> of template folder, go to the selected theme index.php and apply following code
///Developed By Ahmad Naser Turnkey Solutions LLC -
///copyright © 2018 ANTS LLC. All rights reserved.
View LoadingScreenManager.cs
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using UnityEngine.SceneManagement;
public class LoadingScreenManager : MonoBehaviour {
[Header("Loading Visuals")]
public Image loadingIcon;
public Image loadingDoneIcon;
View PlayAudioInSwift3
//Shared on Ahmad
func PlayAudioInSwift3() {
var player = AVAudioPlayer()
let audioPath = Bundle.main().pathForResource("2-loader", ofType: "mp3")
View gist:43f1520faa295162a5f7f6120177ca12
using UnityEngine;
using System.Collections;
/// <summary>
/// Descending Timer.
/// </summary>
public class Timer : MonoBehaviour
public string startTime = "";
public float delayTime = 1;
View Activate UI Bind On SingletonService
public void ActivateOptionsMenu(){
RectTransform Canvas = GameObject.Find ("OptionsCanvas").GetComponent<RectTransform> ();
if (Canvas != null) {
RectTransform[] recs = Canvas.GetComponentsInChildren<RectTransform> (true);
int Count = 0;
int NumOfElements = 2;
foreach (RectTransform r in recs) {
if ( == "Overly") {
ahmadnaser / SingletonService In Unity
Created Oct 8, 2016
Create single instance in unity
View SingletonService In Unity
using UnityEngine;
using System;
using System.Collections.Generic;
public static class SingletonService {
private static Dictionary<Type, object> _singletons = new Dictionary<Type, object>();
//Adds a singleton to the manager
public static void RegisterSingletonInstance<T>(T instance) where T : class {
ahmadnaser / Bootstrap Default Template By AhmadNaser
Created Apr 19, 2016
Bootstrap Default Template By AhmadNaser
View Bootstrap Default Template By AhmadNaser
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Bootstrap Template By AhmadNaser</title>
<!-- Bootstrap -->
ahmadnaser / get the char as an output of two array of bytes summation
Created Mar 12, 2016
get the char as an output of two array of bytes summation
View get the char as an output of two array of bytes summation
//convert string to array of chars
string text = "abcd";
char[] array2 = text.ToCharArray();
//1-convert char to array of bytes
//2-sumation of two array of bytes
//3-return the value of the two arays as array of chars
//4-get the char as an output of two array of bytes summation
//For More Information visit:
View LoadLevelAsync time
using UnityEngine;
using System.Collections;
public class LevelLoader : MonoBehaviour
public int calculations = 10000;
public int iterations = 10000;
public bool inAwake = true;
public bool inStart = true;