Skip to content

Instantly share code, notes, and snippets.

View ZeroByter's full-sized avatar
🏠
Working from home

ZeroByter

🏠
Working from home
View GitHub Profile
hello world!
@ZeroByter
ZeroByter / SteamClient.cs
Created August 28, 2018 06:15
Fixing multiple steam clients issue
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//
// This class takes care of a lot of stuff for you.
//
// 1. It initializes steam on startup.
// 2. It calls Update so you don't have to.
// 3. It disposes and shuts down Steam on close.
PLUGIN.companiesTypes = {}
local privatepolice = baseCompany:Create("police")
privatepolice.needs = {"TYPE_WEAPONS"}
privatepolice.provides = {"TYPE_PROTECTION"}
function privatepolice:New()
obj = {}
setmetatable(obj, self)
self.__index = self
return obj
function get_all_channels_by_order(){
var channels = []
function process(err, result){
channels = result
}
mysql_connection.connect()
var result2 = mysql_connection.query("SELECT * FROM channels ORDER BY listorder ASC", function(err, result){process(err, result)})
mysql_connection.end()
console.log(channels) //this still returns an empty array :(
try{
window.AudioContext = window.AudioContext || window.webkitAudioContext
}catch(e){
alert("Web audio API is not supported in this browser")
}
try{
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia
var hasMicrophoneInput = (navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia)
}catch(e){