-
you can make anything you want here, even if the tools aren't here yet
-
you are responsible for, and capable of, creating the change you want to see in the world
-
it's okay to mess up, just fix and learn from your mistakes
-
be completely honest with yourself and others
-
we are hands-on, cooperative, and behave excellently to each other
View heatsync-area-codes.txt
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
(110 results for 480) | |
(46 results for 602) | |
Other area/country codes: | |
+353 | |
088 | |
208 | |
209 | |
240 | |
303 |
View heatsync-values.md
View binary_multiple.rb
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 http://stackoverflow.com/questions/19305067/regex-binary-multiple-of-4 | |
class String | |
def binary_multiple_4? | |
(/^[10]*00$/ =~ self) == 0 | |
end | |
end | |
puts "4" | |
puts 4.to_s(2).binary_multiple_4? |
View li_link_to.rb
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
#usage: <%= li_link_to 'Home', home_path if (can? :read, Home) %> | |
def li_link_to(name = nil, options = nil, html_options = nil, &block) | |
html_options, options, name = options, name, block if block_given? | |
options ||= {} | |
html_options = convert_options_to_data_attributes(options, html_options) | |
url = url_for(options) | |
html_options['href'] ||= url |
View business.rb
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
class Business < ActiveRecord::Base | |
has_many :businesses_users, :primary_key=>:business_id | |
has_many :users, through: :businesses_users | |
end |
View countdown.html
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
<script type="text/javascript">// <![CDATA[ | |
/* Javascript Countdown Timer | |
* Will Bradley (www.willbradley.name) Dec. 2009 | |
* Code released publicly without any warranty or license. | |
*/ | |
function showtime() { | |
dateString = new Date().toUTCString(); | |
now = Date.parse(dateString); | |
xmasDateString = new Date(1261724400000).toUTCString(); // The long number is December 25, 2009 in Javascript's .getTime() format. You can put almost any value in here, including plain english dates. |
View turtle.rb
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 solution(instructions) | |
position = [0,0] | |
directions = [ | |
[0,1], # north | |
[1,0], # east | |
[0,-1], # south | |
[-1,0] # west | |
] | |
current_dir = 0; | |
history = [] |
View symfony-security-filter.php
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
<?php | |
class SomeController { | |
private function filterSecurityContext($action, $items){ | |
$user = $this->get('security.context')->getToken()->getUser(); | |
$results = array(); | |
foreach($items as $item){ | |
if($this->get('security.context')->isGranted($action, $item)){ | |
$results[] = $item; | |
} |
View assertionWrapper.phpunit.php
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
<?php | |
namespace Acme\YourCompanyBundle\Tests\Controller; | |
use Liip\FunctionalTestBundle\Test\WebTestCase; | |
use Doctrine\ORM\Tools\SchemaTool; | |
// Note: be sure to replace any instance of "Your"/"your" with the appropriate values. | |
class YourControllerTest extends WebTestCase |
View example.js
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
alert( is_iana_reserved_ip("192.168.5.5") ); | |
alert( is_iana_reserved_ip("192.200.5.5") ); |
OlderNewer