Skip to content

Instantly share code, notes, and snippets.

View pedrohenriquerls's full-sized avatar

Pedro Henrique pedrohenriquerls

View GitHub Profile
;;; init.el --- Spacemacs Initialization File
;;
;; Copyright (c) 2012-2017 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
using UnityEngine;
using System.Collections;
public class CameraScreenResolution : MonoBehaviour {
public bool maintainWidth=true;
[Range(-1,1)]
public int adaptPosition;
float defaultWidth;
@pedrohenriquerls
pedrohenriquerls / bench_rails_memory_usage.rb
Created March 16, 2017 14:26 — forked from brianhempel/bench_rails_memory_usage.rb
A script to test the memory usage of your Rails application over time. It will run 30 requests against the specified action and report the final RSS. Choose the URL to hit on line 45 and then run with `ruby bench_rails_memory_usage.rb`.
require "net/http"
def start_server
# Remove the X to enable the parameters for tuning.
# These are the default values as of Ruby 2.2.0.
@child = spawn(<<-EOC.split.join(" "))
XRUBY_GC_HEAP_FREE_SLOTS=4096
XRUBY_GC_HEAP_INIT_SLOTS=10000
XRUBY_GC_HEAP_GROWTH_FACTOR=1.8
XRUBY_GC_HEAP_GROWTH_MAX_SLOTS=0
@pedrohenriquerls
pedrohenriquerls / FightSystem.js
Created December 6, 2015 15:26
The core of my game, called Koder Wizardy. Finalist of Koding Global Hackathon
var Tutorials = require('../profiles/tutorials');
var FightSystem = function (player, enemy) {
this.player = player
this.enemy = enemy
}
var suggestions = [
{name: 'if', value: 'if', score: '1', meta: 'keyword'},
{name: 'else', value: 'else', score: '1', meta: 'keyword'},
{name: 'for', value: 'for', score: '1', meta: 'keyword'},
{name: 'switch', value: 'switch', score: '1', meta: 'keyword'},