Skip to content

Instantly share code, notes, and snippets.

View Matheus-de-Souza's full-sized avatar

Matheus de Souza Matheus-de-Souza

  • Novo Hamburgo, Brazil
View GitHub Profile
Store::Application.routes.draw do
match 'select_url' => 'others/products#select_url'
wiki_root 'ecommerce/wiki'
wiki_root 'publisher/wiki'
wiki_root 'saas/wiki'
def ecommerces
resources :ecommerces, :module => :ecommerce, :except => [:show, :destroy, :edit, :update, :create, :new, :index] do
/(.:format) {:subdomain=>"admin", :controller=>"admin/saas/admin_saas", :action=>"index"}
admin /admin(.:format) {:action=>"index", :controller=>"admin/saas/admin_saas"}
admin_saas_edit GET /admin/saas/:saas_id/edit(.:format) {:action=>"edit", :controller=>"admin/saas/admin_saas"}
admin_saas_show GET /admin/saas/:saas_id/show(.:format) {:action=>"index", :controller=>"admin/saas/admin_saas_publishers"}
admin_saas_publisher_edit GET /admin/saas/:saas_id/publishers/:publisher_id/edit(.:format)
@Matheus-de-Souza
Matheus-de-Souza / unity-iPhone-workarounds.cs
Created July 25, 2012 17:31
Métodos que não funcionam com o iPhone na Unity e seus workarounds
class Fake
{
void fake()
{
//Methods from Path class doesn't works for Unity
//Problem
string directory = Path.GetDirectoryName(filepath);
//Workaround
filepath = filepath.Replace("\\","/");
Vector3 mousePosition = MouseUtils.ConvertMousePositionToWorldPosition(Input.mousePosition,
ScenarioData.MinPointToView,
ScenarioData.MaxPointToView);
public class MouseUtils {
public static Vector3 ConvertMousePositionToWorldPosition(Vector3 mousePosition,
Vector3 minPoint,
Vector3 maxPoint)
{
Vector3 mousePosition = MouseUtils.ConvertMousePositionToWorldPosition(Input.mousePosition,
ScenarioData.MinPointToView,
ScenarioData.MaxPointToView);
public class MouseUtils {
public static Vector3 ConvertMousePositionToWorldPosition(Vector3 mousePosition,
Vector3 minPoint,
Vector3 maxPoint)
{
angular.module('app.filters', [])
.filter('fixDate', fixDate)
fixDate.$inject = ['$rootScope','globalConfig'];
function fixDate ($rootScope, globalConfig) {
return function (strDate) {
if (!$rootScope.isWebDebug() &&
globalConfig.app.platform === "I") {
<platform name="ios">
<preference name="show-splash-screen-spinner" value="false" />
<preference name="auto-hide-splash-screen" value="true" />
<preference name="AutoHideSplashScreen" value="true" />
<preference name="FadeSplashScreenDuration" value="0.5"/>
<preference name="SplashScreenDelay" value="500"/>
</platform>
<platform name="android">
for (var i = 0; i < this.legend.layerInfos.length; i++)
{
var sNomeDiv = "";
var sMensagem = "";
if (this.legend.layerInfos[i].layer.visible)
{
sNomeDiv = this.legend.id + "_" + this.legend.layerInfos[i].layer.id;
if (this.legend.layerInfos[i].layer.description == "" ||
// Tem que instalar antes o plugin de clipboard com
// npm install copy-paste
var fs = require('fs'),
ncp = require("copy-paste");
var arquivo_entrada = __dirname + '/index.html';
var arquivo_saida = __dirname + '/output.html';
var copiar_para_clipboard = true;
<?php
// Ver para conferir os tipos de error reporting
// http://php.net/manual/pt_BR/function.error-reporting.php
error_reporting(E_ALL & ~E_DEPRECATED & ~E_WARNING);
ini_set('display_errors', 1);
?>