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
{# Map #} | |
<script type="text/javascript"> | |
var map = new google.maps.Map(document.getElementById("map"), { | |
zoom: 6, | |
center: new google.maps.LatLng(-32.574592,-55.20605), | |
mapTypeControl: true, | |
mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU}, | |
scrollwheel: false, | |
streetViewControl: false, | |
mapTypeId: google.maps.MapTypeId.TERRAIN |
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 'net/http' | |
require 'uri' | |
# | |
#url = 'http://www.amazon.com/gp/product/B004HFS6Z0/ref=s9_simh_gw_p349_d0_i4?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=center-2&pf_rd_r=1J7QTMKWJXARDQJ77VXD&pf_rd_t=101&pf_rd_p=470938631&pf_rd_i=507846' | |
def fetch(url) | |
#options.merge!(config[:http]) unless config[:http].nil? | |
while true do | |
uri = URI.parse url |
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
gonz@bamboo:~ > git clone git://github.com/maccman/juggernaut.git | |
Cloning into juggernaut... | |
remote: Counting objects: 558, done. | |
remote: Compressing objects: 100% (258/258), done. | |
remote: Total 558 (delta 309), reused 481 (delta 255) | |
Receiving objects: 100% (558/558), 576.74 KiB | 135 KiB/s, done. | |
Resolving deltas: 100% (309/309), done. | |
gonz@bamboo:~ > cd juggernaut |
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
diff --git a/app/js/app.js b/app/js/app.js | |
index c7f8248..0dfc712 100644 | |
--- a/app/js/app.js | |
+++ b/app/js/app.js | |
@@ -45,9 +45,24 @@ var HealthyFamily = Ext.extend(Ext.Application, { | |
* | |
* Returns nothing | |
*/ | |
- show: function(obj) { | |
- this.views.activePanel.items.clear(); |
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
import re, sys | |
keys = ('abc', 'def', 'ghi', 'jkl', 'mno', 'pqrs', 'tuv', 'wxyz') | |
m = dict((l, str(n)) for n, letters in enumerate(keys, start=2) for l in letters) | |
data, ocurrences = {}, {} | |
wmatch = re.compile('[^a-z]+') | |
def learn(word): | |
num = ''.join(m[c] for c in word) | |
for i in xrange(1, len(word) + 1): |
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 'benchmark' | |
require 'set' | |
n = 50000 | |
m = 5000 | |
t = 100 | |
r1 = (1..n).step(3) | |
r2 = (1..m).step(2) | |
s1 = Set.new(r1) |
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
TIMER module_need() : 0.136 ms - Total 0.136 ms / 1 intvls (Avg 0.136 ms) | |
removing module "float32_mixer" | |
main debug: looking for audio mixer module: 3 candidates | |
main debug: using audio mixer module "float32_mixer" | |
main debug: TIMER module_need() : 0.146 ms - Total 0.146 ms / 1 intvls (Avg 0.146 ms) | |
main debug: removing module "float32_mixer" | |
main debug: looking for audio mixer module: 3 candidates | |
main debug: using audio mixer module "float32_mixer" | |
main debug: TIMER module_need() : 0.143 ms - Total 0.143 ms / 1 intvls (Avg 0.143 ms) | |
main debug: removing module "float32_mixer" |
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 MyRender << Fiasco::Render | |
def render(name, locals = {}) | |
if ENV['RACK_ENV'] == 'development' && @templates[name] | |
@compiled.delete(name) | |
declare(name, @templates[name].filename) | |
end | |
super(name, locals) | |
end | |
end |
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
ZENCODER_API_KEY='*********' ./zctest.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 flask.ext.wtf import (Form, TextField, PasswordField, Required, | |
Email, BooleanField, EqualTo) | |
from prism.models.user import User | |
from sqlalchemy import or_ | |
class RegistrationForm(Form): | |
username = TextField('Username', | |
validators=[Required()]) | |
password = PasswordField('Password', validators=[Required()]) |
OlderNewer