I hereby claim:
- I am dotpot on github.
- I am d0tp (https://keybase.io/d0tp) on keybase.
- I have a public key ASCE7Bo3CFFQIGrc-P8V8XYfbMxT2eUk-C5ImAesF_5BQAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
First, you have to enable profiling
> db.setProfilingLevel(1)
Now let it run for a while. It collects the slow queries ( > 100ms) into a capped collections, so queries go in and if it's full, old queries go out, so don't be surprised that it's a moving target...
on run | |
do shell script "sudo kextunload -b com.globaldelight.driver.BoomDevice" with administrator privileges | |
do shell script "sudo rm -rf /System/Library/Extensions/BoomDevice.kext" with administrator privileges | |
do shell script "sudo rm -rf /Library/Extensions/BoomDevice.kext" with administrator privileges | |
end run |
import os | |
import falcon | |
import jinja2 | |
def load_template(name): | |
path = os.path.join('templates', name) | |
with open(os.path.abspath(path), 'r') as fp: | |
return jinja2.Template(fp.read()) |
def space(s, n): | |
"""inserts a space every n characters in string s | |
>>> space('0123456789', 3) | |
'012 345 678 9' | |
>>> space('0123456789', 4) | |
'0123 4567 89' | |
""" | |
return ' '.join(s[i:i+n] for i in range(0, len(s), n)) |
I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.