Skip to content

Instantly share code, notes, and snippets.

View vince-lynch's full-sized avatar
Hello world, <b> 1337 </b>

Vince Lynch vince-lynch

Hello world, <b> 1337 </b>
View GitHub Profile
import asyncio
import binascii
from bleak import discover
device = None
CONSMART_BLE_NOTIFICATION_SERVICE_WRGB_UUID = "0000ffd5-0000-1000-8000-00805f9b34fb";
CONSMART_BLE_NOTIFICATION_CHARACTERISTICS_WRGB_UUID = "0000ffd9-0000-1000-8000-00805f9b34fb";
async def scan():
package bsdq.bsdq.ble;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCallback;
import android.bluetooth.BluetoothGattCharacteristic;
import android.bluetooth.BluetoothGattDescriptor;
var MyBluetoothGatt = null;
var DeviceUUID = {
CONSMART_BLE_NOTIFICATION_SERVICE_WRGB_UUID: "0000ffd5-0000-1000-8000-00805f9b34fb",
CONSMART_BLE_NOTIFICATION_CHARACTERISTICS_WRGB_UUID: "0000ffd9-0000-1000-8000-00805f9b34fb"
}
var sendsrcAES = [-53, 2, 5, 5, 16, 8, 35, 1, 2, 0, 5, 85, 34, 1, 18, 19, 20, -54]; //byteArray - needs definition/conversion?
// Battery Life
@vince-lynch
vince-lynch / Setting up Google Cloud Storage with CORS for Web Fonts.md
Created January 28, 2019 16:26 — forked from rwaldron/Setting up Google Cloud Storage with CORS for Web Fonts.md
Setting up CORS on Google Cloud Storage: An unofficial quick start guide to serving web fonts from Google's cloud. (I'm sure a lot of this info could be improved... Please leave comments if you have tips/improvements.)

Login:

Google Cloud Storage

You'll want to login using an official Google account (i.e. if this is for your company, use the comapany Gmail account vs. a personal one.)

When logging in, you might be prompted to verify the account; if so, enter your cell number to get a verification e-mail or phone call.

Once verified, you'll have to agree to the terms of service; do that, and click continue.

@vince-lynch
vince-lynch / codegolf.md
Created January 22, 2019 16:06 — forked from xem/codegolf.md
JS code golfing

codegolf JS

Mini projects by Maxime Euzière (xem), subzey, Martin Kleppe (aemkei), Mathieu Henri (p01), Litterallylara, Tommy Hodgins (innovati), Veu(beke), Anders Kaare, Keith Clark, Addy Osmani, bburky, rlauck, cmoreau, maettig, thiemowmde, ilesinge, adlq, solinca, xen_the,...

(For more info and other projects, visit http://xem.github.io)

(Official Slack room: http://jsgolf.club / join us on http://register.jsgolf.club)

0xBE09830E9376Ed9474C64D952F62AfDC1f3Bc7Cc
0x0c1A5e96679d1C7D82888641D5F2Df88108CE349
@vince-lynch
vince-lynch / jquery.xdomain.js
Created August 24, 2016 10:09 — forked from mathieucarbou/jquery.xdomain.js
jQuery CORS Plugin - transparently add CORS support for IE8+ in jQuery using XDomainRequest. Support cookies.
PROJECT MOVED TO https://github.com/Ovea/cors
/**
* https://gist.github.com/1114981
*
* By default, support transferring session cookie with XDomainRequest for IE. The cookie value is by default 'jsessionid'
*
* You can change the session cookie value like this, before including this script:
*
* window.SESSION_COOKIE_NAME = 'PHP_SESSION';
@vince-lynch
vince-lynch / twitter.json
Created August 12, 2016 13:23 — forked from hrp/twitter.json
Example JSON response from Twitter streaming API
{
"text": "RT @PostGradProblem: In preparation for the NFL lockout, I will be spending twice as much time analyzing my fantasy baseball team during ...",
"truncated": true,
"in_reply_to_user_id": null,
"in_reply_to_status_id": null,
"favorited": false,
"source": "<a href=\"http://twitter.com/\" rel=\"nofollow\">Twitter for iPhone</a>",
"in_reply_to_screen_name": null,
"in_reply_to_status_id_str": null,
"id_str": "54691802283900928",
@vince-lynch
vince-lynch / topkeywords.js
Created February 13, 2016 17:19 — forked from elliotbonneville/topkeywords.js
Find top keywords associated with a Google search with this Node.js application.
var request = require("request"),
cheerio = require("cheerio"),
url = "https://www.google.com/search?q=data+mining",
corpus = {},
totalResults = 0,
resultsDownloaded = 0;
function callback () {
resultsDownloaded++;