Skip to content

Instantly share code, notes, and snippets.

View MBehtemam's full-sized avatar
🦄
Full Of Energey

Mohammad Bagher Ehtemam MBehtemam

🦄
Full Of Energey
View GitHub Profile
@MBehtemam
MBehtemam / my-vs-code-config.json
Last active November 7, 2017 15:43
My Visual Studio Code Config
{
"editor.fontFamily": "Operator Mono SSm Light",
"editor.fontSize": 14,
"workbench.colorTheme": "Dracula Soft",
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\bash.exe",
"workbench.iconTheme": "vscode-great-icons",
"window.zoomLevel": 0,
"vim.disableAnnoyingNeovimMessage": true,
"vim.statusBarColorControl": true,
"vim.statusBarColors": {
@MBehtemam
MBehtemam / Connectivity.java
Created July 31, 2016 06:15 — forked from emil2k/Connectivity.java
Android utility class for checking device's network connectivity and speed.
package com.emil.android.util;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.telephony.TelephonyManager;
/**
* Check device's network connectivity and speed
* @author emil http://stackoverflow.com/users/220710/emil
@MBehtemam
MBehtemam / CameraShake.cs
Created July 10, 2016 06:40 — forked from ftvs/CameraShake.cs
Simple camera shake effect for Unity3d, written in C#. Attach to your camera GameObject.
using UnityEngine;
using System.Collections;
public class CameraShake : MonoBehaviour
{
// Transform of the camera to shake. Grabs the gameObject's transform
// if null.
public Transform camTransform;
// How long the object should shake for.
@MBehtemam
MBehtemam / gist:69964e2c095547ef3ea007e531803e0f
Created July 6, 2016 09:57
Sample .gitignore for using in Unity3D game engine
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Kk]eys
*.csproj
*.unityproj
*.sln
*.suo
@MBehtemam
MBehtemam / C#
Last active May 29, 2016 09:37
Is Player Grounded in Unity with CircleCast
public LayerMask layerGround; //Layer mask
private bool IsGrounded()
{
bool isGrounded = false;
if (Physics2D.CircleCast (transform.position, 0.1f, Vector2.down, 0.5f, layerGround)){
isGrounded = true;
}
else{
isGrounded = false;
}
@MBehtemam
MBehtemam / D.cs
Last active August 29, 2015 14:17 — forked from onevcat/D.cs
#define DEBUG_LEVEL_LOG
#define DEBUG_LEVEL_WARN
#define DEBUG_LEVEL_ERROR
using UnityEngine;
using System.Collections;
// setting the conditional to the platform of choice will only compile the method for that platform

Install OS X 10.10 Yosemite in VirtualBox

(based on this pastebin i've found via Google, markdownified and adjusted to work with the official Yosemite release)

Yosemite's first developer preview was released right after Monday's WWDC opening keynote. For the general public, an open beta will be available to download later this summer. However, for those who want a sneak peek at the new hotness, there is a way to safely install it without risking your machine, using the free and powerful VirtualBox application from Oracle.

(LEGAL DISCLAIMER: This guide aims to explain how to create a virtual machine on a regularly purchased Apple computer, running a genuine Mac OS X operating system, for testing purposes only.)

(function() {
"use strict";
angular.module('gen.genericDirectives', [])
.directive('genDynamicDirective', ['$compile',
function($compile) {
return {
restrict: "E",
require: '^ngModel',
scope: true,
@MBehtemam
MBehtemam / ncalendar holiday
Created August 2, 2014 10:54
NCalendar Holiday Model
[{title:"روز ترویج آموزش های فنی و حرفه ای",date:"1393/5/6",vacation:false},
{title:"مرداد روز، جنش مردادگان",date:"1393/5/7",vacation:false},
{title:"عید سعید فطر",date:"1393/5/7",vacation:true},
{title:"روز اهدای خون",date:"1393/9/6",vacation:false},
{title:"روز بزرگداشت ابوعلی سینا و روز پزشک",date:'1393/6/1',vacation:false},
{title:"آغاز هفته دولت",date:'1393/6/2',vacation:false},
{title:"روز مبارزه با تروریسم",date:'1393/6/8',vacation:false},
{title:"جشن آب پاشونک",date:'1393/5/1',vacation:false},
{title:"روز جهانی مبارزه",date:'1393/5/5',vacation:false},
{title:"This is Test",date:'1393/5/14',vacation:false}
@MBehtemam
MBehtemam / ncalendar holiday
Created August 2, 2014 10:53
NCalendar Holiday Model
{title:"روز ترویج آموزش های فنی و حرفه ای",date:"1393/5/6",vacation:false},
{title:"مرداد روز، جنش مردادگان",date:"1393/5/7",vacation:false},
{title:"عید سعید فطر",date:"1393/5/7",vacation:true},
{title:"روز اهدای خون",date:"1393/9/6",vacation:false},
{title:"روز بزرگداشت ابوعلی سینا و روز پزشک",date:'1393/6/1',vacation:false},
{title:"آغاز هفته دولت",date:'1393/6/2',vacation:false},
{title:"روز مبارزه با تروریسم",date:'1393/6/8',vacation:false},
{title:"جشن آب پاشونک",date:'1393/5/1',vacation:false},
{title:"روز جهانی مبارزه",date:'1393/5/5',vacation:false},
{title:"This is Test",date:'1393/5/14',vacation:false}