Skip to content

Instantly share code, notes, and snippets.

@taesiri
taesiri / AndroidManifest.xml
Created November 12, 2013 14:26
Sample Unity3D Plugin for Sending SMS in Android. (JAVA plugin)
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.BrainDump.PluginTester"
android:versionCode="2"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
@taesiri
taesiri / glui.rkt
Created November 27, 2013 11:10 — forked from tonyg/2d.rkt
#lang racket/base
;; Experimentation with OpenGL for widgetry.
(require racket/class)
(require racket/gui/base)
(require sgl)
(require sgl/gl-vectors)
(define c%
(class canvas%
@taesiri
taesiri / SDL 2 Basic Window
Last active August 29, 2015 13:57
SDL2 Basic OpenGL Window
# Compile Command
# Mac Os X
g++ source.cpp -L/usr/local/lib -lSDL2
^
Link to Library Directory
@taesiri
taesiri / OpenGL with D
Last active August 29, 2015 13:57
OpenGL with D - Mac Os X
Installing dub using brew
$ brew install dub
Create project using dub
$ dub init hello_opengl
After compiling glfw, put a local copy of libglfw.dylib (glfw/build/src/libglfw.dylib) in hello_opengl directory
@taesiri
taesiri / gist:9648811
Created March 19, 2014 18:59
Ad-hoc Creator
write-host("Ad-Hoc Creator")
write-host("Please enter an SSID") -foreground "green"
$network_name = Read-Host
write-host("Please enter a Password") -foreground "green"
$network_pass = Read-Host
write-host "Stopping current hosted network ..." -foreground "yellow"
netsh wlan stop hostednetwork
write-host "Creating new network ..."-foreground "green"
netsh wlan set hostednetwork mode=allow ssid=$network_name key=$network_pass
write-host("Starting network ...") -foreground "green"
@taesiri
taesiri / calprint.rb
Last active August 29, 2015 13:57
Print Calendar in Console like cal command in Mac OS X
class CalendarPrinter
@@daysOfWeek = ['Su','Mo', 'Tu','We','Th','Fr', 'Sa' ]
def initialize(monthName, year, startDayOfMonth, daysOfMonth)
@month = monthName
@year = year
@firstDayOfMonth = startDayOfMonth
@totalDaysOfMonth = daysOfMonth
end
A = imread('peppers.png');
G = fspecial('gaussian', [5,5], 2);
GFilter = fspecial('gaussian', [5,5], 2);
G = imfilter(I, GFilter);
figure;
subplot(141); imshow(A); title('Original Image');
subplot(142); imshow(G); title('Gaussian Filter');
subplot(143); imshow(A-G); title('Difference');
subplot(144); imshow((A-G).^2); title('Difference^{2}');

Intro

To view the progress of a Powerpoint presentation, a progress bar can be displayed at the bottom of the slide show.

How to proceed

Once the slideshow is complete, go to Tools > Macro > Visual Basic Editor.

In the new window, select Insert > Module and copy this text in the blank page:

Sub AddProgressBar()
    On Error Resume Next
@taesiri
taesiri / GetComponent<Transform> vs gameObject.transform vs storing gameObject.transform in a variable.md
Last active February 18, 2021 18:29
GetComponent<Transform> vs gameObject.transform vs storing gameObject.transform in a variable

Performance Test - Acceesing transfrom of an object in Unity3D

  • Method 1 - GetComponent
  • Method 2 - gameObject.transform
  • Method 3 - storing gameObject.transform in a variable
@taesiri
taesiri / Colors.cs
Created August 28, 2014 15:01
List of some Color Properties!
public Color Daffodil { get { return new Color(255, 230, 23); } }
public Color Daisy { get { return new Color(250, 211, 28); } }
public Color Mustard { get { return new Color(253, 183, 23); } }
public Color CitrusZest { get { return new Color(250, 170, 23); } }
public Color Pumpkin { get { return new Color(241, 117, 63); } }
public Color Tangerine { get { return new Color(237, 87, 36); } }
public Color Salmon { get { return new Color(240, 70, 57); } }
public Color Persimmon { get { return new Color(234, 40, 48); } }
public Color Rouge { get { return new Color(188, 35, 38); } }
public Color Scarlet { get { return new Color(140, 12, 3); } }