Skip to content

Instantly share code, notes, and snippets.

We are using Disqus SSO (2012) in conjunction with wordpress for one of our clients.
The site is in Spanish and the translation is mostly working.
http://screencast.com/t/h5aDGaX4aI
The Spanish translation for the actual comment thread works fine.
But the comment/reaction counts are still returned in English.
The comment counts that disqus replaces wordpress comment counts with comes from a file called count.js (it's part of the JSON in that file).
Is what we're trying to do not possible in 2012?
import re
def check(test_str):
pattern = r'(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:\'".,<>?\xab\xbb\u201c\u201d\u2018\u2019]))'
if not re.search(pattern, test_str):
print 'Invalid : %r' % (test_str,)
else:
print 'Valid : %r' % (test_str,)
check("http://www.timbroder.com")
Index: dts_class_switcher.php
===================================================================
--- dts_class_switcher.php (revision 696222)
+++ dts_class_switcher.php (working copy)
@@ -84,26 +84,37 @@
// DEVICE READING & ALTERNATE THEME OUTPUT
// ------------------------------------------------------------------------
public function detect_device_and_set_flag () {
- //Include the MobileESP code library for acertaining device user agents
- include_once('mdetect.php');
for when you are bored
http://girlswhodocrossfit.tumblr.com/
http://crossfitchicks.tumblr.com/
http://crossfitbabes.tumblr.com/
http://pinterest.com/werk8/crossfit-girls/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100

Keybase proof

I hereby claim:

  • I am broderboy on github.
  • I am timbroder (https://keybase.io/timbroder) on keybase.
  • I have a public key whose fingerprint is EB1E 3CD8 E2EB 5369 9898 4B3D 634C 9851 BC45 49A6

To claim this, I am signing this object:

<html><body>one two three four five</body></html>
six seven eight nine ten
@timbroder
timbroder / gist:0b46482e34be6aa89561
Created June 24, 2014 22:39
Comic recommendations
Non-Super Hero
Y: The Last man
http://www.amazon.com/The-Last-Man-Vol-Unmanned/dp/1563899809?tag=nyen0e-20
DMZ
http://www.amazon.com/DMZ-Vol-Ground-Brian-Wood-ebook/dp/B008V56I8E/ref=sr_1_1?ie=UTF8&sr=1-1&s=books&keywords=DMZ%2Bvol%2B1&tag=nyen0e-20&qid=1403649187
Preacher
http://www.amazon.com/Preacher-Book-One-Garth-Ennis/dp/1401240453/ref=sr_1_1?ie=UTF8&sr=1-1&s=books&keywords=Preacher%2BVol%2B1&tag=nyen0e-20&qid=1403649226
2014-08-17 15:23:47.640 Read[12754:336845] 17545849:_UIScreenEdgePanRecognizerEdgeSettings.edgeRegionSize=13.000000
2014-08-17 15:23:49.993 Read[12754:336845] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** +[NSLayoutConstraint constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:]: A constraint cannot be made between a leading/trailing attribute and a right/left attribute. Use leading/trailing for both or neither.'
*** First throw call stack:
(
0 CoreFoundation 0x00000001102e93e5 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010ff99967 objc_exception_throw + 45
2 CoreFoundation 0x00000001102e931d +[NSException raise:format:] + 205
3 Foundation 0x000000010d99529e +[NSLayoutConstraint constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:] + 427
4 Read 0x000000010c89334e -[FBRGBView _set