Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
| require 'csv' | |
| def memstats | |
| size = `ps -o size= #{$$}`.strip.to_i | |
| end | |
| memstats #4900 | |
| CSV.open('visitors.csv', headers: true) do |csv| | |
| visitors = csv.each # Enumerator | |
| memstats # 5164 |
| #! /bin/sh | |
| alias gs="git status" | |
| alias gc="git commit" | |
| alias gr="git checkout" | |
| alias ga="git add" | |
| alias gl="git lola" |
| <% flash.each do |type, message| %> | |
| <div class="alert <%= bootstrap_class_for(type) %> fade in"> | |
| <button class="close" data-dismiss="alert">×</button> | |
| <%= message %> | |
| </div> | |
| <% end %> |
| inputs = %w[ | |
| CollectionSelectInput | |
| DateTimeInput | |
| FileInput | |
| GroupedCollectionSelectInput | |
| NumericInput | |
| PasswordInput | |
| RangeInput | |
| StringInput | |
| TextInput |
| describe "Shopping Cart Requests" do | |
| let!(:user) { Fabricate(:user) } | |
| before(:each) do | |
| login_user_post("admin", "admin") | |
| end | |
| context "when I visit the shopping cart" do | |
| it " show the logged in users' cart items " do | |
| #Test stuff |
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
| var serial_maker = function(){ | |
| // produce an object that produces unique strings. | |
| var prefix = ''; | |
| var seq = 0; | |
| return { | |
| set_prefix: function (p) { | |
| prefix = String(p); | |
| }, |