Skip to content

Instantly share code, notes, and snippets.

View dancrew32's full-sized avatar
🕶️
🕶

Dan Masquelier dancrew32

🕶️
🕶
View GitHub Profile
@dancrew32
dancrew32 / distinct_keys.js
Created November 8, 2013 07:54
Mongo distinct keys map reduce
var collection = "your_collection"
var distinct_keys_map_reduce = db.runCommand({
"mapreduce" : collection,
"map" : function() {
for (var key in this) { emit(key, null); }
},
"reduce" : function(key, val) { return null; },
"out": collection + "_keys"
})
db[distinct_keys_map_reduce.keys].distinct("_id")
@dancrew32
dancrew32 / keybase.md
Last active August 29, 2015 14:05
keybase.md

Keybase proof

I hereby claim:

  • I am dancrew32 on github.
  • I am danmasq (https://keybase.io/danmasq) on keybase.
  • I have a public key whose fingerprint is 5E90 C928 4DD2 9D13 7C12 A67F 1C1A 4117 AB12 D13C

To claim this, I am signing this object:

@dancrew32
dancrew32 / tmobile-apn-mms-fix.md
Last active January 17, 2016 07:20
tmobile gsm blackberry classic q20 apn mms "general problems" solution

T-Mobile Blackberry Classic "General Problems" MMS solution

You're here because you're setting up a Blackberry on OS10 for T-Mobile and none of your MMS text messages are sending. Here is how you fix that. T-Mobile seems to only setup the APN for you by default, but they forget to configure the final step (2.6 below), which actually makes it work.

See flashfox's original answer.

Please leave a comment if you have something to add!

1. Mobile Network APN

<?xml version="1.0"?>
<!----------------------------------------------------------------------------
A frontal cat face detector using the basic set of Haar features, i.e.
horizontal and vertical features but not diagonal features.
Contributed by Joseph Howse ([email protected]).
More information can be found in the following publications and
presentations:
@dancrew32
dancrew32 / react_stripe_elements_mock.js
Created March 22, 2019 01:02
react-stripe-elements mock object so you can run the damn unit tests.
export const mockWindowStripe = () => {
window.Stripe = () => ({
createSource: jest.fn(),
elements: () => ({
create: () => ({
mount: jest.fn(),
update: jest.fn(),
destroy: jest.fn(),
on: jest.fn(),
}),
@dancrew32
dancrew32 / qcodes.txt
Created March 25, 2022 07:13
qcodes for ham radio
‘Q’ CODES
QAV Are you calling me ? ( I am calling . . . )
QRA What is your station ?
QRB How far away are you ?
QRG What channel am I on ?
QRH Does my frequency vary ?
QRI How is my tone ?
QRJ Are youy recieving me badly ? Are signals too weak ?
QRK What is my readability ? ( 1 to 5 ) 1 = unreadable. 5 = perfect.
QRL Are you busy ? ( I am busy, do not cut in. )