-
Install Q3 fork ioquake3 along with original game patch files (baseq3/pak{1-8}.pk3, missionpack/pak{1-3}.pk3)
brew cask reinstall ioquake3
-
Build ioquake3 master branch
git clone https://github.com/ioquake/ioq3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3388 | Why You Should Do A Tiny Product First | |
| http://unicornfree.com/2013/why-you-should-do-a-tiny-product-first | |
3494 | Startup Escape Plan: How to free up time, energy & money to build your future | |
| http://unicornfree.com/2014/startup-escape-plan-free-up-time-energy-money-to-invest | |
3603 | 5 Years of SaaS Growth: Every Month, Exact Numbers | |
| http://unicornfree.com/2013/5-years-of-saas-growth-every-month-exact-numbers | |
3623 | Help! My SaaS isn't growing! +60% revenue, 1 year later… |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'objspace' | |
class A | |
# When we include a module, it makes an invisible "included class" (T_ICLASS), | |
# and places it in the inheritance hierarchy, as the superclass. | |
# Hence A the inclusion, A no longer has a direct reference to Object, | |
# it now has a direct reference to the included class | |
ObjectSpace.reachable_objects_from(self) # => [#<InternalObject:0x007f8cd29343b8 T_CLASS>, "A", Object] | |
m = Module.new | |
include m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-> { a = case when true then return end } # this is allowed | |
-> { a = if true then return end } # this is not | |
-> { a = if true then return; 2 end } # this is | |
-> { a = (true && return) } # this is allowed | |
-> { a = (return && true) } # this is not | |
-> { a = begin; return | |
rescue; return | |
ensure; return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'thread' | |
# Create a SizedQueue with a buffer capacity of just one. | |
queue = SizedQueue.new 1 | |
# Add four symbols to the SizedQueue. (A SizedQueue is thread-safe just like a | |
# Queue.) | |
Thread.new { queue << :of } | |
Thread.new { queue << :earl } | |
Thread.new { queue << :and } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is from the end of weakref.rb: | |
if __FILE__ == $0 | |
# require 'thread' | |
foo = Object.new | |
p foo.to_s # original's class | |
foo = WeakRef.new(foo) | |
p foo.to_s # should be same class | |
ObjectSpace.garbage_collect | |
ObjectSpace.garbage_collect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From a fresh install of squeeze | |
apt-get install ruby rubygems # Need ruby to use fpm | |
gem1.8 install fpm --no-ri --no-rdoc | |
apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev ncurses-dev libyaml-dev | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz | |
tar -zxvf ruby-1.9.3-p125.tar.gz | |
cd ruby-1.9.3-p125 | |
rm -rf /tmp/ruby193 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def mymeth | |
puts "Hello" | |
end | |
puts :mymeth.to_proc.call | |
#SOLAR:~ chriswhite$ ruby -v | |
#rubinius 1.2.5dev (1.8.7 1b8a960a yyyy-mm-dd JI) [x86_64-apple-darwin10.8.0] | |
#SOLAR:~ chriswhite$ ruby test_proc.rb | |
#Hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'openssl' | |
require 'base64' | |
secret_message = 'foo!' | |
aes = OpenSSL::Cipher.new 'AES-256-CBC' | |
aes.encrypt | |
iv = aes.random_iv # never EVER use the same IV if you're reusing a key | |
rnd = aes.random_key |
NewerOlder