Skip to content

Instantly share code, notes, and snippets.


Alex Ciobica c10b10

View GitHub Profile
c10b10 / github_repos.rb
Last active Dec 11, 2018
Clones all the private github repos from a certain organization, including branches, submodules and wiki
View github_repos.rb
#!/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]}"{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"]}]

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 / Coding Standards and Best
Created Feb 24, 2013
Coding Standards and Best Practices
View Coding Standards and Best
c10b10 /
Created Feb 16, 2013 — forked from olasitarska/
Builds epub book out of Paul Graham's essays
# -*- coding: utf-8 -*-
Builds epub book out of Paul Graham's essays:
Author: Ola Sitarska <>
Copyright: Licensed under the GPL-3 (
This script requires python-epub-library:
c10b10 / SkypeMenuUpdater.rb
Created Feb 8, 2013 — forked from pwc3/SkypeMenuUpdater.rb
Should Add Skype Notifications in Menu
View SkypeMenuUpdater.rb
#!/usr/bin/env ruby
FSCRIPT_PATH = "/Library/Frameworks/FScript.framework"
GDB = IO.popen("gdb", "w")
def gdb(cmd)
GDB.puts cmd
c10b10 / Post type argument test
Last active Dec 11, 2015 — forked from jeremyfelt/gist:2625350
Post type argument test results
View Post type argument test
'rewrite' => true
'public' => true 'publicly_queryable' => true /cpt-slug/cpt-post-slug Loads fine
'public' => false 'publicly_queryable' => true /cpt-slug/cpt-post-slug Loads fine
'public' => true 'publicly_queryable' => false /cpt-slug/cpt-post-slug 404 Error
'public' => false 'publicly_queryable' => true /cpt-slug-cpt-post-slug 404 Error
'rewrite' => false
'public' => true 'publicly_queryable' => true /?cpt-slug=cpt-post-slug Loads fine
'public' => true 'publicly_queryable' => true /?p=ID&post_type=cpt-slug Loads fine
'public' => false 'publicly_queryable' => true /?cpt-slug=cpt-post-slug Loads fine
c10b10 /
Created Nov 20, 2012 — forked from olasitarska/
Builds epub book out of Paul Graham's essays.
# -*- coding: utf-8 -*-
Builds epub book out of Paul Graham's essays:
Author: Ola Sitarska <>
This script requires python-epub-library:
import re, ez_epub, urllib2, genshi
c10b10 / wp-plugin-path.php
Created Nov 17, 2012 — forked from alexkingorg/wp-plugin-path.php
Defining symlink compatible paths for WordPress plugins
View wp-plugin-path.php
// include this near the top of your plugin file
$my_plugin_file = __FILE__;
if (isset($plugin)) {
$my_plugin_file = $plugin;
else if (isset($mu_plugin)) {
c10b10 / gist:3447964
Created Aug 24, 2012 — forked from AAS/gist:2036916
OS X 10.7 Lion Finder - Folders on top
View gist:3447964
Open Terminal.
Type this command:
cd /System/Library/CoreServices/
Now, the file we want to mess around is the InfoPlist.strings. But unfortunately, this file cannot be edited directly using text editor in Lion. But no worries. Run this command to make it editable.
sudo plutil -convert xml1 InfoPlist.strings
Now the file should be editable and readable. Use your favorite text editor and open InfoPlist.strings. I just used vim
sudo vim InfoPlist.strings
c10b10 /
Created Oct 7, 2015 — forked from paulirish/
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.


Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()