Skip to content

Instantly share code, notes, and snippets.

@Immortal-
Immortal- / LiveCoding Instructions
Created May 29, 2016 02:37 — forked from devx00/LiveCoding Instructions
Instructions to setup external streaming and chatting for livecoding.tv streams
// ************** Instructions for connecting to the LiveCoding chatrooms from a 3rd party application. ****************
Step 1a (Ubuntu/ any OS with aptitude (aka apt-get)) :
sudo apt-add-repository ppa:rsrchboy/profanity && sudo apt-get update
apt-get install profanity
--
Step 1b (OSX w/ homebrew):
$ brew install profanity
--------
@Immortal-
Immortal- / PWM.php
Created May 25, 2016 08:18
A Php hardware pwm wrapper
<?php
/**
* @ Author: Chris
* @ Date: 5/25/2016
* @ Disc: Hardware pwm wrapper!
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
public delegate void ThreadQueueWorkDelegate<T>(T task);
/// <summary>
/// ThreadQueue
/// Made by BahNahNah
<?php
/*
* For uvcdynctrl 0.2.4
* Logitech c615 https://www.logitech.com/en-us/product/hd-webcam-c615
*/
class Api
{
private function setCmd($cmd, $value)
{
exec("uvcdynctrl -v -d video0 --set '".$cmd."' '$value' 2>&1",$output);
@Immortal-
Immortal- / installer.php
Created April 19, 2016 20:53
installer
<?php
function cmd($command)
{
exec("$command 2>&1", $output);
return $output;
}
function InstallSoftware()
{
#include <string>
#include <iostream>
#include <stdio.h>
#include <ctime>
using namespace std;
void InstallSoftware();
void FormatDrive();
{
"id": "onion-rgbled",
"name": "RGB Led Tool",
"icon": true
}
<link rel="import" href="/lib/polymer/polymer.html">
<link rel="import" href="/lib/iron-flex-layout/classes/iron-flex-layout.html">
<link rel="import" href="/elements/onion-app/onion-app.html">
<link rel="import" href="/lib/iron-icons/iron-icons.html">
<link rel="import" href="/lib/iron-icons/hardware-icons.html">
<link rel="import" href="/elements/bootstrap-dropdown/bootstrap-dropdown.html">
<dom-module id="onion-rgbled">
<style>
:host {
@Immortal-
Immortal- / OmegaPHPExample.php
Last active April 9, 2016 05:29
Ussing OmegaPHP.php
<?php
require 'OmegaPHP.php'; //Require Our Library You can get at https://gist.github.com/Immortal-/a18f58ac5c21ba27921b7626b5a8b06e
$gpio = new OmegaPHP();
//Turns pin 0 to On or HIGH or 1
$pin = (int)0; //This is just for my testing purposes You do not have to cast to an int.
$gpio->SetPIN($pin,HIGH);// Set's the pin to 1 or HIGH
$returned = $gpio->ReadPin($pin);
@Immortal-
Immortal- / OmegaPHP.php
Last active April 13, 2016 03:07
GPIO class for the Omega by Onion using php.
<?php
/**
* @Author: Chris McCaslin
* @Date: 4/8/2016
* @Orignal-Php Idealist: https://github.com/ringmaster/GPIOHelperPHP/ (Good idea, But I don't like reinventing the wheel why recode fast-gpio with php?)
* @Update: 4/12/2016 Added SetFlow, and GetDirection still need to write documentation on these methods.
*/
class OmegaPHP
{