Skip to content

Instantly share code, notes, and snippets.

View renews's full-sized avatar
😀

Renê Schneider renews

😀
View GitHub Profile
# add the email package
meteor add email
@renews
renews / cookbook.md
Last active August 29, 2015 14:14 — forked from thebyrd/cookbook.md

#Cookbook

Redis

If you don’t want to spend time setting up redis yourself, just use thebyrd/[email protected]

$ bowery add cache
$ bowery connect
$ bowery ssh cache
root@17e65aa587e8:/# apt-get install -y gcc
root@17e65aa587e8:/# wget http://download.redis.io/releases/redis-2.8.6.tar.gz

Tutorial: Meteor in Windows using Vagrant

BEFORE YOU CONTINUE:

These days some people were discussing at meteor-talk group about running Meteor at Windows and I’ve recommended them using Vagrant. It’s a very developer-friendly piece of software that creates a virtual machine (VM) which let you run any operating system wanted and connect to it without big efforts of configuration (just make the initial installation and you have it working).

Many packages (I've tested) for running Meteor+Vagrant fails because Meteor writes its mongodb file and also other files inside local build folder into a shared folder between the Windows host and the Linux guest, and it simply does not work. So I've put my brain to work and found a solution: do symlinks inside the VM (but do not use ln. Use mount so git can follow it). It’s cove

// Smooth Follow from Standard Assets
// Converted to C# because I fucking hate UnityScript and it's inexistant C# interoperability
// If you have C# code and you want to edit SmoothFollow's vars ingame, use this instead.
using UnityEngine;
using System.Collections;
public class SmoothFollow : MonoBehaviour {
// The target we are following
public Transform target;
@renews
renews / Console.cs
Last active August 29, 2015 14:16 — forked from mminer/Console.cs
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// A console to display Unity's debug logs in-game.
/// </summary>
public class Console : MonoBehaviour
{
struct Log
{
@renews
renews / cameraFOV
Created March 12, 2015 21:52
Camera FOV Unity - Control by Mouse
var minFov: float = 15f;
var maxFov: float = 90f;
var sensitivity: float = 10f;
function Update () {
var fov: float = Camera.main.fieldOfView;
fov += Input.GetAxis("Mouse ScrollWheel") * sensitivity;
fov = Mathf.Clamp(fov, minFov, maxFov);
Camera.main.fieldOfView = fov;
}
@renews
renews / CameraZoom
Created March 12, 2015 21:53
Unity - Camera Zoom With mouse
var ZoomAmount : float = 0; //With Positive and negative values
var MaxToClamp : float = 10;
var ROTSpeed : float = 10;
function Update() {
ZoomAmount += Input.GetAxis("Mouse ScrollWheel");
ZoomAmount = Mathf.Clamp(ZoomAmount, -MaxToClamp, MaxToClamp);
var translate = Mathf.Min(Mathf.Abs(Input.GetAxis("Mouse ScrollWheel")), MaxToClamp - Mathf.Abs(ZoomAmount));
gameObject.transform.Translate(0,0,translate * ROTSpeed * Mathf.Sign(Input.GetAxis("Mouse ScrollWheel")));
}
@renews
renews / gist:f1707b8d1882819ce962
Created March 21, 2015 15:31
Babun Inside ConEmu
Create a new task
Task parameters /icon "%userprofile%\.babun\cygwin\bin\mintty.exe" /dir "%userprofile%"
Commands %userprofile%\.babun\cygwin\bin\mintty.exe -
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"