This file contains hidden or 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
<?php | |
# ./MyLib/Exception.php | |
namespace MyLib; | |
class Exception extends \Exception {} |
This file contains hidden or 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
/Users/bschaeffer/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb | |
checking for rb_thread_blocking_region()... yes | |
checking for mysql.h... no | |
checking for mysql/mysql.h... no | |
----- | |
mysql.h is missing. please check your installation of mysql and try again. | |
----- | |
*** extconf.rb failed *** | |
Could not create Makefile due to some reason, probably lack of | |
necessary libraries and/or headers. Check the mkmf.log file for more |
This file contains hidden or 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
<html> | |
<head></head> | |
<body> | |
<textarea> | |
OMG</textarea> | |
</body> | |
</html> |
This file contains hidden or 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
ids = [1,2,3] | |
def targs(*ids) | |
puts ids.length | |
puts ids.flatten.length | |
end | |
targs ids | |
#=> 1 | |
#=> 3 |
This file contains hidden or 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
# Ubuntu PHP requirements | |
sudo apt-get install libcurl4-gnutls-dev libjpeg8-dev libpng12-dev libmcrypt-dev libtidy-dev |
This file contains hidden or 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
/var/tmp/php-build/source/5.4.0/ext/openssl/openssl.c: In function ‘php_pkey_free’: | |
/var/tmp/php-build/source/5.4.0/ext/openssl/openssl.c:491: warning: ‘EVP_PKEY_free’ is deprecated (declared at /usr/include/openssl/evp.h:885) | |
/var/tmp/php-build/source/5.4.0/ext/openssl/openssl.c: In function ‘add_assoc_name_entry’: | |
/var/tmp/php-build/source/5.4.0/ext/openssl/openssl.c:573: warning: ‘X509_NAME_entry_count’ is deprecated (declared at /usr/include/openssl/x509.h:1097) | |
/var/tmp/php-build/source/5.4.0/ext/openssl/openssl.c:578: warning: ‘X509_NAME_get_entry’ is deprecated (declared at /usr/include/openssl/x509.h:1108) | |
/var/tmp/php-build/source/5.4.0/ext/openssl/openssl.c:579: warning: ‘X509_NAME_ENTRY_get_object’ is deprecated (declared at /usr/include/openssl/x509.h:1129) | |
/var/tmp/php-build/source/5.4.0/ext/openssl/openssl.c:580: warning: ‘OBJ_obj2nid’ is deprecated (declared at /usr/include/openssl/objects.h:1009) | |
/var/tmp/php-build/source/5.4.0/ext/openssl/openssl.c:584: warning: ‘OBJ_nid2sn’ is deprecated (de |
This file contains hidden or 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
times = ARGV[0].to_i | |
range = 1..20 | |
counts = Hash[range.to_a.map{|i| [i, 0]}] | |
times.times do | |
i = range.to_a.sample | |
counts[i] = counts[i] + 1 | |
end | |
counts.each_pair { |k,v| puts "#{k.to_s.ljust(range.max.length)} => #{v}" } |
This file contains hidden or 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
# Migratoin generated by Devsie v2.2.2 | |
# https://github.com/plataformatec/devise | |
class DeviseCreateAdmins < ActiveRecord::Migration | |
def change | |
create_table(:users) do |t| | |
## Database authenticatable | |
t.string :email, :null => false, :default => "" | |
t.string :encrypted_password, :null => false, :default => "" |
This file contains hidden or 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
# Always resolve a Deferred object. Expects that the given method | |
# will return a Deferred object. | |
# | |
App.resolveAlways = (method) -> | |
deferred = jQuery.Deferred() | |
method().then (resolved) -> | |
deferred.resolve(resolved) | |
, (rejected) -> | |
deferred.resolve(rejected) | |
deferred.promise() |
This file contains hidden or 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
window.visibly = | |
b: null, | |
q: document, | |
p: undefined, | |
prefixes: ['webkit', 'ms'] | |
props: ['VisibilityState', 'visibilitychange', 'Hidden'] | |
m: ['focus', 'blur'] | |
visibleCallbacks: [] | |
hiddenCallbacks: [] | |
_callbacks: [] |
OlderNewer