Skip to content

Instantly share code, notes, and snippets.

Kosso kosso

Block or report user

Report or block kosso

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kosso
kosso / manifest.plist example
Last active Jun 15, 2019
Special file for self-hosting internal .ipa installers
View manifest.plist example
/*
On a web page, you can then use a link like this to start the download/install process:
<a href="itms-services://?action=download-manifest&amp;url=https://[YOUR_SECURE_URL_TO]/manifest.plist"> INSTALL THE APP </a>
DELETE ALL ABOVE THIS */
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
@kosso
kosso / RollerLEDWand.ino
Created Nov 25, 2018
Initial PoC sketch to 'write' words with LEDs while rolling a rotary encoder.
View RollerLEDWand.ino
#define ENCODER_DO_NOT_USE_INTERRUPTS
#include <Encoder.h>
Encoder myEnc(12, 13);
#define ENC_SW 14 // Encoder Switch
long newapos = 0;
long lastapos = 0;
unsigned char words[]={
View ti_identity_example.js
var Identity = require('ti.identity');
var my_identifier = 'my-device-udid';
// use:
getAppUDID(my_identifier, function(data){
console.log('getAppUDID: ', data);
});
function getAppUDID(identifier, callback){
@kosso
kosso / websocket-relay-secure.js
Created Sep 2, 2018 — forked from TiagoCN/websocket-relay-secure.js
websocket-relay.js from JSMpeg slightly modified to use HTTPS instead of HTTP
View websocket-relay-secure.js
// Use the websocket-relay to serve a raw MPEG-TS over WebSockets. You can use
// ffmpeg to feed the relay. ffmpeg -> websocket-relay -> browser
// Example:
// node websocket-relay yoursecret 8081 8082
// ffmpeg -i <some input> -f mpegts https://localhost:8081/yoursecret
var fs = require('fs'),
https = require('https'),
WebSocket = require('ws');
View ESP32_multiple_timers_experiment.ino
/*
orginal code via:
* Copyright (c) 2017 pcbreflux. All Rights Reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but
@kosso
kosso / ESP32_timers_pulses_experiment.ino
Created Mar 24, 2018
Experimental code to use two timers to create and control two fast pulses for eventual use with stepper motor drivers.
View ESP32_timers_pulses_experiment.ino
// Trying and dynamically set, start and stop the timers.
// so we can set the pulse delay at that point, rather than within the timer ISR
#include <Arduino.h>
// ESP32 Registers
// https://www.espressif.com/sites/default/files/documentation/esp32_technical_reference_manual_en.pdf
// Serial Tests and Timers
// type '1go' or '2go' in Serial monitor to start 10us timer counter.
View ESP32_BLE_Notify_Write_Setvalue.ino
#include <BLEDevice.h>
#include <BLEServer.h>
#include <BLEUtils.h>
#include <BLE2902.h>
#include <esp_heap_caps.h>
#include <esp_heap_trace.h>
BLECharacteristic *pCharacteristic;
bool deviceConnected = false;
@kosso
kosso / strip_tags.html
Created Dec 12, 2017
Extract text only from HTML
View strip_tags.html
<html>
<head>
<script>
function strip_tags (str, allowed_tags) {
// via http://kevin.vanzonneveld.net
var key = '', allowed = false;
var matches = [];
View gist:7cd06b19839f45355574449eb5a6a70e
..
processor = audio_context.createScriptProcessor(0, 1, 1);
processor.onaudioprocess = function (event) {
var array_left = event.inputBuffer.getChannelData(0);
var array_right = event.inputBuffer.getChannelData(1);
// ....
};
// Begin retrieving microphone data.
audio_context.microphone.connect(processor);
View angularjs_directive_attribute_explanation.md

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
You can’t perform that action at this time.