Skip to content

Instantly share code, notes, and snippets.

View dancrew32's full-sized avatar
🕶️
🕶

Dan Masquelier dancrew32

🕶️
🕶
View GitHub Profile
@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. )
@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(),
}),
<?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 (josephhowse@nummist.com).
More information can be found in the following publications and
presentations:
@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

@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 / 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 / rdiopop.log
Last active December 23, 2015 10:09
rdio chrome popping noise log
loading.target.rdio: 81.574ms www.rdio.com/:27
loading.js: 687.297ms www.rdio.com/:27
[Wed Sep 18 2013 22:04:52 GMT-0700 (PDT)] [Services] Loader is ready core.rdio.a7d29e55813049a4dbf6f873a8816314.js:1
[Wed Sep 18 2013 22:04:52 GMT-0700 (PDT)] [Services] Storage is ready core.rdio.a7d29e55813049a4dbf6f873a8816314.js:1
[Wed Sep 18 2013 22:04:52 GMT-0700 (PDT)] [Services] ShortcutManager is ready core.rdio.a7d29e55813049a4dbf6f873a8816314.js:1
[Wed Sep 18 2013 22:04:52 GMT-0700 (PDT)] [Services] WebSocketFactory is ready core.rdio.a7d29e55813049a4dbf6f873a8816314.js:1
[Wed Sep 18 2013 22:04:52 GMT-0700 (PDT)] [FallbackWrapper] Embedding fallback swf core.rdio.a7d29e55813049a4dbf6f873a8816314.js:1
[Wed Sep 18 2013 22:04:52 GMT-0700 (PDT)] [Services] Notifications is ready core.rdio.a7d29e55813049a4dbf6f873a8816314.js:1
[Wed Sep 18 2013 22:04:52 GMT-0700 (PDT)] [Services] OfflineMonitor is ready core.rdio.a7d29e55813049a4dbf6f873a8816314.js:1
[Wed Sep 18 2013 22:04:52 GMT-0700 (PDT)] [Timer] loading.target.rdio:
@dancrew32
dancrew32 / uber.js
Created November 14, 2012 21:37
Uber.js, call an UberCab from command line.
#!/usr/local/bin/casperjs
/*
* Uber.js
* Call an UberCab from the command line
* Usage:
* update `email` and `pass` variables to match your uber.com account
* ./uber.js <my address>
*/
@dancrew32
dancrew32 / ssh-copy-id
Created August 24, 2012 22:02
ssh copy id as in /usr/bin/ssh-copy-id
#!/bin/sh
# Shell script to install your public key on a remote machine
# Takes the remote machine name as an argument.
# Obviously, the remote machine must accept password authentication,
# or one of the other keys in your ssh-agent, for this to work.
ID_FILE="${HOME}/.ssh/id_rsa.pub"
if [ "-i" = "$1" ]; then
@dancrew32
dancrew32 / ermagherd.js
Created July 26, 2012 23:08
ermagherd translator for node.js
// to use in nodejs, just var erma = require('./ermagherd.js').ermagherd;
// erma.gherd('my string');
var erma = {
translate: function(word) {
// Don't translate short words
if (word.length == 1) {
return word;
}