Skip to content

Instantly share code, notes, and snippets.

View c10b10's full-sized avatar
🥗

Alex Ciobica c10b10

🥗
View GitHub Profile
@c10b10
c10b10 / Coding Standards and Best Practices.md
Created February 24, 2013 10:07
Coding Standards and Best Practices

I'm having trouble understanding the benefit of require.js. Can you help me out? I imagine other developers have a similar interest.

From Require.js - Why AMD:

The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order"

I don't quite understand why this methodology is so bad. The difficult part is that you have to manually order dependencies. But the benefit is that you don't have an additional layer of abstraction.


@c10b10
c10b10 / github_repos.rb
Last active December 11, 2018 08:48
Clones all the private github repos from a certain organization, including branches, submodules and wiki
#!/usr/bin/env ruby
require "json";
# Change github credentials and organization name
github = {:user => "johndoe", :pass => "password", :org => "twitter"}
repos = `curl --user "#{github[:user]}:#{github[:pass]}" https://api.github.com/orgs/#{github[:org]}/repos\?per_page\=200\&type\=private`
for repo in JSON.load(repos)
puts "\n+++ Starting with " + repo["name"]
%x[git clone #{repo["ssh_url"]}]