Skip to content

Instantly share code, notes, and snippets.

View AssemDeghady's full-sized avatar

Assem Deghady AssemDeghady

View GitHub Profile
@unitycoder
unitycoder / UI2World.cs
Last active July 17, 2024 18:55
Move UI element to world gameobject position
// https://forum.unity.com/threads/overlay-canvas-and-world-space-coordinates.291108/#post-9627593
// translating between overlay canvas and world space coordinates
uiObject.transform.position = RectTransformUtility.WorldToScreenPoint(Camera.main, worldObject.transform.TransformPoint(Vector3.zero));
--------
// http://answers.unity3d.com/questions/799616/unity-46-beta-19-how-to-convert-from-world-space-t.html
//this is your object that you want to have the UI element hovering over
@maxivak
maxivak / readme.md
Last active March 25, 2023 01:56
sitemap.xml for Rails 4 application

Generate sitemap.xml in Rails app

This post shows how to make sitemap.xml for your web site. The sitemap will be accessible by URL http://mysite.com/sitemap.xml

Routes

Myrails::Application.routes.draw do
@iangreenleaf
iangreenleaf / gist:b206d09c587e8fc6399e
Last active June 20, 2024 02:39
Rails naming conventions

Rails naming conventions

General Ruby conventions

Class names are CamelCase.

Methods and variables are snake_case.

Methods with a ? suffix will return a boolean.

@chetan
chetan / yardoc_cheatsheet.md
Last active May 10, 2024 02:53
YARD cheatsheet
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')