Skip to content

Instantly share code, notes, and snippets.

View TechplexEngineer's full-sized avatar

Blake Bourque TechplexEngineer

View GitHub Profile
Verifying my Blockstack ID is secured with the address 1LjvWYXonYnt8Q5a7U6q3SdeGvh2zUBW2v https://explorer.blockstack.org/address/1LjvWYXonYnt8Q5a7U6q3SdeGvh2zUBW2v
@TechplexEngineer
TechplexEngineer / bleUUIDfind.cpp
Created July 26, 2017 10:57
Check for a series of bytes in a byte array. https://repl.it/JjHx/1
#include <stdint.h>
#include <stdio.h>
bool checkUuidInScanData(uint8_t* advData, uint8_t advDataLen, uint8_t* bleUUID, uint8_t bleUUIDLen)
{
for (int i = advDataLen; i > bleUUIDLen; --i)
{
for (int j = 0; j < bleUUIDLen; ++j)
{
printf("i=%d a=%x \t j=%d u=%x\n", i, advData[i-j], j, bleUUID[j]);
var base = "https://www.thebluealliance.com/api/v2";
var options = {
headers: {
"X-TBA-App-Id": "blakeb:fantasyfrcsheet:1.0",
}
};
//Docs: https://www.thebluealliance.com/apidocs#team-events-request
// This function takes a team number and returns a pipe delimited list of the weeks they are competing
function weeksAttending(teamNum) {
@TechplexEngineer
TechplexEngineer / imagemagick_with_jpeg_jp2_png.md
Created March 1, 2017 23:41
Compiling ImageMagick 7.0.5 with jpeg, jp2 and png support
  1. Install needed deps: apt-get install libjpeg62 libjpeg62-dev libpng16-16 libpng16-dev libopenjpeg-dev libjpeg-dev libopenjp2-7-dev

  2. Download the ImageMagik source cd ImageMagick-7.0.5-0

  3. Untar the source tar xfz ImageMagick.tar.gz

  4. Run Configure

//v1.1
//Settings
float SCAN_DELAY = 60; //seconds
integer DEBUG = TRUE;
string location = "";
float SCAN_RANGE = 32;
//Constants
string baseURL = "https://docs.google.com/forms/d/e/<GOOGLE_SHEET_ID>/formResponse?";
key reqid = NULL_KEY;
#!/usr/bin/env python
# License MIT
import os, re, sys
where = '.'
try:
where = sys.argv[1]
except:
pass
{
"folders":
[
{
"folder_exclude_patterns":
[
".meteor/local",
"node_modules"
],
"path": "."
@TechplexEngineer
TechplexEngineer / nginx.proxy.meteor.and.letsencrypt
Created January 31, 2017 13:12
Sample NGINX configuration showing how to proxy meteor and enable letsencrypt webroot renewal
# Dev server configuration
#
server_tokens off; # for security-by-obscurity: stop displaying nginx version
# this section is needed to proxy web-socket connections
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
@TechplexEngineer
TechplexEngineer / co.sublime-snippet
Created January 16, 2017 13:18
Meteor Sublime Snippets
<snippet>
<content><![CDATA[
console.log(${1});
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>co</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.javascript</scope> -->
</snippet>
---
- name: Deploy code
hosts: appservers
# become: true
remote_user: '{{username}}'
vars:
install_dir: /home/{{username}}/software #no trailing slash
vars_prompt:
- name: "tag"