Skip to content

Instantly share code, notes, and snippets.

View Bioblaze's full-sized avatar

Bioblaze Payne Bioblaze

View GitHub Profile
@Bioblaze
Bioblaze / php
Created September 7, 2015 18:33
Allowing Access to API from another Domain, without knowing the Domain to Add.
// Allow from any origin
if (isset($_SERVER['HTTP_ORIGIN'])) {
//header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");
header("Access-Control-Allow-Origin: *");
header('Access-Control-Allow-Credentials: true');
header('Access-Control-Max-Age: 86400'); // cache for 1 day
} else {
header("Access-Control-Allow-Origin: *");
header('Access-Control-Allow-Credentials: true');
header('Access-Control-Max-Age: 86400'); // cache for 1 day
@Bioblaze
Bioblaze / gist:e80f4f5b5eee340e6ea0
Created February 5, 2016 23:40
Half Done Example of a Use Data model for Virtual Worlds
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var bcrypt = require('bcrypt'), SALT_WORK_FACTOR = 10;
var UserSchema = new Schema({
name: {
first: { type: String, required: true },
last: { type: String, required: true, default: "resident" }
},
@Bioblaze
Bioblaze / AnotherFile.js
Created January 25, 2017 02:45
One-way EventEmitter to Multiple Files
var Event = require('./Events').eventBus;
Events.on("test", function() {
console.log('it worked');
});
@Bioblaze
Bioblaze / DiscordProxy.js
Created January 25, 2017 07:00
Proxy for Discord.io
var Debug = require('winston'); // logging all Errors
Debug.configure({
transports: [
new (Debug.transports.Console)(),
new (Debug.transports.File)({ filename: 'Debug.log' })
]
});
var DiscordProxy = {
addClient: function(client) {
@Bioblaze
Bioblaze / MakehumanUE4BoneFix.py
Created April 8, 2017 04:23
This is a Fix for Makehuman to UE4 Skeleton Reassignment When you import a avatar from Makehuman, normally you`ll retarget the UE4 Skeleton to Match. When you do that, as you import animations from the UE4 Skeleton it changes them slightly, joints are out of line, bones are resized. This fixes that, bring them into Blender, and run this script. …
import bpy
bl_info = {
"name": "Fix Makehuman UE4 Animation",
"description": "Goes through and fixes all the Scale and Location of all Bones other then Root.",
"author": "Bioblaze Payne",
"version": (0,1),
"location": "View3D > Pose Mode > Unreal Engine",
"category": "Animation"
}
### Keybase proof
I hereby claim:
* I am bioblaze on github.
* I am bioblaze (https://keybase.io/bioblaze) on keybase.
* I have a public key ASBdK_p2b3fin-eF-ZuJZrk0mSHbK8O6c0YMybQlfM7DBgo
To claim this, I am signing this object:
location ^~ /.well-known/acme-challenge {
root /var/www/letsencrypt;
default_type "text/plain";
}
@Bioblaze
Bioblaze / BlueprintAsyncHTTP.cpp
Created April 21, 2020 16:26
Example of a Async Blueprint HTTP Call.
// Fill out your copyright notice in the Description page of Project Settings.
#include "loginUserClient.h"
#include "ClientSDK.h"
#include "ClientSDKStructs.h"
#include "ConfigCacheIni.h"
#include "Misc/MessageDialog.h"
#include "Interfaces/IHttpResponse.h"
#include "HttpModule.h"
#include "Dom/JsonObject.h"
@Bioblaze
Bioblaze / picam-stream.sh
Created June 26, 2020 05:22 — forked from russfeld/picam-stream.sh
Stream Raspberry Pi Camera to Twitch
#!/bin/bash
# =================================================================
# Stream configuration file for Raspberry Pi Camera
#
# @author Russell Feldhausen (russfeldh@gmail.com)
# @version 2019-06-05
#
# This set of commands should allow you to stream video from your
# Raspberry Pi Camera to Twitch and Youtube (and possibly other
@Bioblaze
Bioblaze / stream_to_youtube.sh
Created June 26, 2020 05:23 — forked from olasd/stream_to_youtube.sh
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube