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
#!/usr/bin/env ruby | |
gitlab_db = 'gitlabhq_production' | |
auto_alter_namespace_name = false | |
if ARGV[0] | |
gitlab_db = ARGV[0] | |
end | |
if ARGV[1] | |
if ARGV[1] =~(/^(true|t|yes|y|1)$/i) | |
auto_alter_namespace_name = true |
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
#!/usr/bin/env ruby | |
gitlab_db = 'gitlabhq_production' | |
if ARGV[0] | |
gitlab_db = ARGV[0] | |
end | |
puts "Using gitlab database as: #{gitlab_db}" | |
require 'pg' |
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
#!/usr/bin/env ruby | |
require 'pg' | |
conn = PG::Connection.new(:dbname => 'colab', :user => 'postgres') | |
colab_users = conn.exec('SELECT USERNAME,EMAIL FROM ACCOUNTS_USER') | |
conn = PG::Connection.new(:dbname => 'gitlabhq_production', :user => 'postgres') | |
gitlab_users = conn.exec('SELECT USERNAME,EMAIL, ID FROM USERS') |
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
#!/usr/bin/env ruby | |
gitlab_db = 'gitlabhq_production' | |
if ARGV[0] | |
gitlab_db = ARGV[0] | |
end | |
puts "Using gitlab database as: #{gitlab_db}" | |
require 'pg' |
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 urllib3 | |
import time | |
from lxml import etree | |
import pickle | |
import sys | |
from random import randint | |
import random | |
import os | |
from Queue import Queue |
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 workerpool | |
import urllib3 | |
import time | |
from lxml import etree | |
import pickle | |
import sys | |
from random import randint | |
import random | |
import os |
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 urllib2 | |
from urllib2 import HTTPError | |
from urllib2 import URLError | |
import os.path | |
import lxml.html | |
ex_number = 1001 | |
while True: | |
try: |