Skip to content

Instantly share code, notes, and snippets.

@esden
esden / bmp_tpwr_en.scr
Last active September 17, 2020 15:26
Small gdb script to enable Black Magic Probe Target Power 'tpwr'.
#!/usr/bin/env arm-none-eabi-gdb -nx -batch -x
# The Black Magic Probe has level shifter buffers on its frontend,
# this gdb script enables Black Magic Probe target power,
# this is needed if you are not providing reference voltage from your target.
# Do not run this script or enable target power if you have VREF connected.
# The BMP side TPWR is connected to the 3.3V regulator of the Black Magic Probe
# and it has no protections, so don't fry your target or Black Magic Probe by
# being hasty and not thinking about what you are doing. :D
@hollodotme
hollodotme / Install-nginx-with-http2-support.md
Created April 9, 2016 17:07
Install nginx with http2 support on ubuntu 14.04 LTS (Trusty)

How to install nginx (>= 1.9.5) with http2 support on Ubuntu 14.04 LTS (Trusty)

IMPORTANT: Backup your nginx site configs (usually under /etc/nginx/sites-available)!

Remove old nginx

Remove old nginx incl. nginx-common:

apt-get autoremove --purge nginx nginx-common
@jamesarosen
jamesarosen / two-travis-builds.md
Last active June 5, 2021 18:39
Running Two Very Different Travis Builds

I have a project that's been happily chugging along on Travis for a while. Its .travis.yml looks something like

script:
  - node_modules/ember-cli/bin/ember test

I wanted to add a second parallel build that did something very different. I didn't want to run ember test with a different Ember version or some other flag. I wanted to run a completely different command. Specifically, I wanted to run LicenseFinder's audit.

Travis has great docs on customizing parallel builds, but nothing describes how to do two completely different commands.

@veproza
veproza / AGPS.md
Last active July 23, 2023 04:36
Getting u-blox MAX-7C GPS to work with Assisted A-GPS

Getting u-blox MAX-7C GPS to work with Assisted A-GPS

So you got your u-blox GPS and wired it up only to look at it struggling to get a valid fix? Under less than ideal conditions, it can take a better part of half an hour. That's because unlike your smartphone GPS, it doesn't have the luxury of having downloaded all the auxiliary navigation data (almanacs and the lot) out-of-band, via fast mobile connection. Instead it relies on the satellite's signal itself, which is being transmitted to you at meager 50 bits per second (I'm not missing "kilo" there, it's three orders of magnitude slower than your 2G GPRS connection).

Luckily, the u-blox receivers are fitted with what the company calls "AssistNow" capability and it does exactly the same thing your iPhone does - feeds the GPS with pre-downloaded almanacs, speeding up the acquisition process to mere seconds.

In principle, the process looks easy enough - we just need to download the data, and then push them to the receiver. Sadly, the AssistNow documentat

@yihuang
yihuang / redis_asyncio.py
Last active August 3, 2020 11:01
benchmark gevent vs asyncio on python3.4
import asyncio
import hiredis
d = {}
def process(req):
cmd = req[0].lower()
if cmd==b'set':
d[req[1]] = req[2]
return b"+OK\r\n"
@yihuang
yihuang / uwsgi-gevent-benchmark.rst
Last active July 17, 2019 10:20
uwsgi gevent benchmark
CPU

Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz (X8)

OS

debian7

PYTHON

python2.7.3

GEVENT

gevent-1.0rc1

UWSGI

1.9.15-dev

hello world

:

@paulmillr
paulmillr / active.md
Last active May 15, 2024 02:25
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user => user.followers > 1000)