Advertisement
srghma

Untitled

Aug 27th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.01 KB | None | 0 0
  1. links = [
  2. ["/articles/James%20Burnham", "/articles/james-burnham-the-new-class-and-the-nation-state"],
  3. ["/articles/british_riots.htm", "/articles/british-race-riots-were-predictable-and-predicted"],
  4. ["/articles/cavalli-sforza_ii.htm", "/articles/cavalli-sforza-ii-seven-dumb-ideas-about-race"],
  5. ["/articles/derbs-april-diary-times-altman-a-dissident-right-mole-chinese-underwear-wasp-privilege-etc", "/articles/derb-s-april-diary-time-s-altman-a-dissident-right-mole-chinese-underwear-wasp-privilege-etc"],
  6. ["/articles/derbs-hate-thoughts-on-the-telemundo-muchacha-the-magic-negro-and-trumps-bruised-buoyancy", "/articles/derb-s-hate-thoughts-on-the-telemundo-muchacha-the-magic-negro-and-trump-s-bruised-buoyancy"],
  7. ["/articles/dismantling_america_guiltfest.htm", "/articles/dismantling-america-contd-that-duluth-guiltfest"],
  8. ["/articles/end-the-april-agony-bring-back-iq-tests/8", "/articles/end-the-april-agony-bring-back-iq-tests"],
  9. ["/articles/first_universal_goldberg.htm", "/articles/the-first-universal-goldberg"],
  10. ["/articles/francis_reparations_wrong.htm", "/articles/real-reasons-reparations-are-wrong"],
  11. ["/articles/george-borjas-on-the-medias-immigration-economics-people-now-are-getting-that-its-complete-", "/articles/george-borjas-on-the-media-s-immigration-economics-people-now-are-getting-that-it-s-complete-nonsense"],
  12. ["/articles/god-bless-ice", "/posts/god-bless-ice"],
  13. ["/articles/indianapolis-shooting-by-black-teen-starts-conversation-about-nra-convention-but-not-black-", "/articles/indianapolis-shooting-by-black-teen-starts-conversation-about-nra-convention-but-not-black-expo"],
  14. ["/articles/ins_stomping.htm", "/articles/ins-stomping-on-d-c-sniper-whistleblowers"],
  15. ["/articles/leaving_first_world.htm", "/articles/u-s-leaving-first-world"],
  16. ["/articles/liberty_shield.htm", "/articles/be-a-liberty-shield-report-illegals"],
  17. ["/articles/mexico_talleyrand.htm", "/articles/mexico-s-talleyrand"],
  18. ["/articles/multiplying.htm", "/articles/illegal-mexicans-consular-offices-multiplying"],
  19. ["/articles/new-york-times-finds-civil-rights-commissions-condemnation-of-hate-bill-and-ag-holders-jim-", "/articles/new-york-times-finds-civil-rights-commission-s-condemnation-of-hate-bill-and-ag-holder-s-jim-snow-policies-unfit-to-print"],
  20. ["/articles/new-yorks-other-new-economy", "/articles/new-york-s-other-new-economy"],
  21. ["/articles/nfap-makes-their-case-for-unregulated-immigration", "/posts/nfap-makes-their-case-for-unregulated-immigration"],
  22. ["/articles/oaklands-bilingualism-no-americans-need-apply", "/articles/oakland-s-bilingualism-no-americans-need-apply"],
  23. ["/articles/populists-aren-t-organizing-is-it-because-they-won-t-or-can-t", "/posts/populists-aren-t-organizing-is-it-because-they-won-t-or-because-they-re-not-being-allowed-to"],
  24. ["/articles/protester-ruins-statue-of-liberty-on-july-4-with-protest-in-favor-of-more-foreigners", "/posts/black-woman-protester-ruins-statue-of-liberty-on-july-4-with-protest-in-favor-of-more-foreigners"],
  25. ["/articles/record-shows-hate-crimes-prevention-bill-will-suppr", "/articles/record-shows-hate-crimes-prevention-bill-will-suppress-speech"],
  26. ["/articles/report-from-occupied-america-goodbye-columbus-come-back-pancho-villa-nm-town-surrenders-to-", "/articles/report-from-occupied-america-goodbye-columbus-come-back-pancho-villa-nm-town-surrenders-to-mexican-bandits"],
  27. ["/articles/stealth_invasion.htm", "/articles/stealth-invasion"],
  28. ["/articles/steve-sailers-obama-book-americas-half-blood-prince-is-finally-available", "/articles/steve-sailer-s-obama-book-america-s-half-blood-prince-is-finally-available"],
  29. ["/articles/straight-outta-compton-whitewashes-rappers-role-in-anti-korean-riots", "/articles/straight-outta-compton-whitewashes-rapper-s-role-in-anti-korean-riots"],
  30. ["/articles/superbowl-2011-ne-patriots-vs-ny-giants-and-anti-white-stereotypes", "/posts/superbowl-2011-ne-patriots-vs-ny-giants-and-anti-white-stereotypes"],
  31. ["/articles/the-case-of-the-truth-telling-but-racially-incorrect-teacher/7", "/articles/the-case-of-the-truth-telling-but-racially-incorrect-teacher"],
  32. ["/articles/the-race-faq/embed", "/articles/the-race-faq"],
  33. ["/articles/treason-lobbyist-ed-gillespie-wants-to-be-virginia-s-gop-senator-is-he-the-worst-candidate-", "/articles/treason-lobbyist-ed-gillespie-wants-to-be-virginia-s-gop-senator-is-he-the-worst-candidate-ever"],
  34. ["/articles/vdares-labor-immigration-archive", "/articles/vdare-s-labor-immigration-archive"],
  35. ["/articles/war_against_christmas_2001.htm", "/letters/war-against-christmas-2001-the-winner"],
  36. ["/articles/why_blacks_hate_dubya.htm", "/articles/why-do-blacks-hate-dubya"],
  37. ["/letters/a-concerned-reader-points-out-that-there-are-jamaican-and-haitian-dreamers-too", "/letters/a-concerned-reader-points-out-that-there-are-jamaican-and-haitian-dreamers-too-we-instance-washington-sniper-malvo"],
  38. ["/letters/a-graduate-of-houstons-former-robert-e-lee-high-school-remembers", "/letters/a-graduate-of-houston-s-former-robert-e-lee-high-school-remembers"],
  39. ["/letters/a-houston-reader-wonders-if-the-washington-posts-shooting-statistics-mean-what-they-say", "/letters/a-houston-reader-wonders-if-the-washington-post-s-shooting-statistics-mean-what-they-say"],
  40. ["/letters/a-reader-says-the-posts-hatred-of-trump-is-reminiscent-of-their-hatred-of-an-earlier-patriot", "/letters/a-reader-says-the-post-s-hatred-of-trump-is-reminiscent-of-their-hatred-of-an-earlier-patriot"],
  41. ["/letters/an-australian-reader-remembers-some-commonwealth-history-the-double-standard-that-hit-south-", "/letters/an-australian-reader-remembers-some-commonwealth-history-the-double-standard-that-hit-south-africa-in-1961"],
  42. ["/posts/2kevins-with-grace-a-talk-with-james-fulford", "/posts/2kevins-with-grace-steel-is-the-free-market-really-free-hilaire-belloc-s-the-servile-state-a-talk-with-james-fulford"],
  43. ["/posts/Can%20Cops%20Get%20a%20Fair%20Trial%20in%20America?", "/articles/michelle-malkin-can-cops-get-a-fair-trial-in-america"],
  44. ["/posts/a-chinamans-chance-of-not-being-called-racist", "/posts/a-chinaman-s-chance-of-not-being-called-racist"],
  45. ["/posts/a-reporting-problem-looms-la-times-story-on-laid-off-teachers-is-plagued-by-non-sequiturs-and-", "/posts/a-reporting-problem-looms-la-times-story-on-laid-off-teachers-is-plagued-by-non-sequiturs-and-omissions"],
  46. ["/posts/affordable-family-formation-the-neglected-key-to-gops-future", "/posts/affordable-family-formation-the-neglected-key-to-gop-s-future"],
  47. ["/posts/allan-wall-on-mancow-muller-show", "/posts/allan-wall-on-the-mancow-muller-show"],
  48. ["/posts/americas-senator-jeff-sessions-reiterates-trump-support-for-immigration-enforcement", "/posts/america-s-senator-jeff-sessions-reiterates-trump-support-for-immigration-enforcement"],
  49. ["/posts/anthony-weiner-and-huma-abedin", "/posts/anthony-weiner-huma-abedin-marriage-is-like-the-de-facto-israel-saudi-arabia-alliance"],
  50. ["/posts/arizonas-murder-show-reckless-behavior", "/posts/arizona-s-murder-show-reckless-behavior"],
  51. ["/posts/arnolds-negative-maintenance-mistress", "/posts/arnold-s-negative-maintenance-mistress"],
  52. ["/posts/assimilation-works-but-not-in-chinatown", "/posts/assimilation-works-but-not-in-chinatown-or-little-italy"],
  53. ["/posts/britannicas-negro-a-question-for-discussion", "/posts/the-encyclopaedia-britannica-s-negro-a-question-for-discussion"],
  54. ["/posts/deval-patricks-mansion-for-sale", "/posts/deval-patrick-s-mansion-for-sale"],
  55. ["/posts/does-anyone-in-the-gop-have-the-guts-to-call-obamas-bluff", "/posts/does-anyone-in-the-gop-have-the-guts-to-call-obama-s-bluff"],
  56. ["/posts/dr-norm-matloff-on-computerworld", "/posts/dr-norm-matloff-on-computerworld-itgrunt-and-tunnel-rat"],
  57. ["/posts/dr-norm-matloffs-reply-to-obama-speech", "/posts/dr-norm-matloff-s-reply-to-obama-speech"],
  58. ["/posts/europes-core-value-of-open-borders-enables-illegal-alien-invasion", "/posts/europe-s-core-value-of-open-borders-enables-illegal-alien-invasion"],
  59. ["/posts/go-big-or-go-home-time-for-ices-thomas-homan-to-crack-down-on-california", "/articles/go-big-or-go-home-time-for-ice-s-thomas-homan-to-crack-down-on-california"],
  60. ["/posts/hate-crime-bill-deal-still-not-done", "/posts/hate-crime-bill-dirty-deal-still-not-done"],
  61. ["/posts/heather-mac-donald-good-on-obamas-anti-white-eulogy-but-not-on-confederate-flag", "/posts/heather-mac-donald-good-on-obama-s-anti-white-eulogy-but-not-on-confederate-flag"],
  62. ["/posts/immigration-professors-illegals-a", "/letters/a-university-of-new-hampshire-professor-emeritus-says-black-unemployment-closely-linked-to-illegal-immigration"],
  63. ["/posts/in-the-carolinas-another-meddling", "/posts/in-the-carolinas-another-meddling-mexican-diplomat"],
  64. ["/posts/intelligence-guided-by-experience", "/posts/firemen-and-intelligence-guided-by-experience"],
  65. ["/posts/interesting-partial-defense-of-confederate-flag-flying-by-heebs-jewdar", "/posts/interesting-partial-defense-of-confederate-flag-flying-by-heeb-s-jewdar"],
  66. ["/posts/italians-protest-their-governments-immigrant-dumping", "/posts/italians-protest-their-government-s-immigrant-dumping"],
  67. ["/posts/its-border-control-not-birth-control", "/posts/birth-control-or-border-control"],
  68. ["/posts/jacob-weisbergs-latest-charm-offensive", "/posts/jacob-weisberg-s-latest-charm-offensive"],
  69. ["/posts/jeb-bushs-act-of-love-and-jeffrey-dahmer", "/posts/jeb-bush-s-act-of-love-and-jeffrey-dahmer"],
  70. ["/posts/joel-steins-own-private-jesse-jackson", "/posts/joel-stein-s-own-private-jesse-jackson"],
  71. ["/posts/laura-wood-reports-on-lawrence-austers-funeral", "/posts/laura-wood-reports-on-lawrence-auster-s-funeral"],
  72. ["/posts/malmo-sweden-secondary-school-closes-because-of-violence", "/posts/malmo-sweden-secondary-school-closes-because-of-muslim-immigrant-violence"],
  73. ["/posts/merkels-boner-the-gift-that-keeps-on-giving", "/posts/merkel-s-boner-the-gift-that-keeps-on-giving-merkel-to-keep-out-19-million-syrians-by-letting-in-79-million-turks"],
  74. ["/posts/mysteries-of-uc-san-diego-the-pillow-case-and-rose-atrocity-the-disappeared-follow-up-and-the-", "/posts/mysteries-of-uc-san-diego-the-pillow-case-and-rose-atrocity-the-disappeared-follow-up-and-the-non-existent-task-force"],
  75. ["/posts/nyt-despite-abe-vigodas-passing-stale-pale-male-oscar-voters-still-not-dying-fast-enough-to-suit-academy", "/posts/nyt-despite-abe-vigoda-s-passing-stale-pale-male-oscar-voters-still-not-dying-fast-enough-to-suit-academy"],
  76. ["/posts/obamas-hispanic-immigration-chief-arrogantly-flaunts-no-borders-polic", "/posts/obama-s-hispanic-immigration-chief-arrogantly-flaunts-no-borders-policy"],
  77. ["/posts/racism-and-ann-althouses-front-porch", "/posts/racism-and-ann-althouse-s-front-porch"],
  78. ["/posts/racists-hide-racism-at-racist-rally", "/posts/nicholas-stix-racists-hide-racism-at-racist-rally"],
  79. ["/posts/radio-derb-transcript-september-9", "/posts/radio-derb-transcript-for-september-9-up-another-caribbean-festival-another-butcher-s-bill-etc"],
  80. ["/posts/radio-derb-transcript-up-olympic-notes-the-gayest-straightest-hardest-to-watch-and-most-suspect-etc", "/posts/august-12-radio-derb-transcript-up-olympic-notes-the-gayest-straightest-hardest-to-watch-and-most-suspect-etc"],
  81. ["/posts/sheriff-mack-runs-against-lamar-smith", "/posts/sheriff-richard-mack-runs-against-lamar-smith"],
  82. ["/posts/sweden-is-rattled-by-diverse-foreigner-violence", "/posts/sweden-is-rattled-by-diverse-foreigner-violence-the-moral-superpower-is-considering-deportations"],
  83. ["/posts/the-pluto-flyby-euro-civilizations-last-hurrah", "/posts/the-pluto-flyby-euro-civilization-s-last-hurrah"],
  84. ["/posts/the-right-stuff-angry-white-dude-as-polemicist/4", "/posts/the-right-stuff-angry-white-dude-as-polemicist"]
  85. ]
  86.  
  87. def make_update_q(table, field, old, new)
  88. sql = %{UPDATE #{table} SET #{field} = REPLACE(#{field}, ?, ?) WHERE #{field} ~* ?}
  89.  
  90. sql_query = ActiveRecord::Base.send(:sanitize_sql_array, [sql, old, new, old])
  91.  
  92. sql_query
  93. end
  94.  
  95. links
  96. .each do |(old, new)|
  97. ActiveRecord::Base.connection.execute(make_update_q('publications', 'content', old, new))
  98. ActiveRecord::Base.connection.execute(make_update_q('publications', 'short_content', old, new))
  99. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement