Skip to content

Instantly share code, notes, and snippets.

@Lightnet
Lightnet / CMakeLists.txt
Created April 18, 2021 21:25
SDL 2 Project build test.
#================================================
# CMAKE BUILD
# WINDOW BUILD CURRENTLY
#================================================
cmake_minimum_required(VERSION 3.20) # FetchContent is available in 3.11+
message("CMAKE_BUILD_TYPE >>> " ${CMAKE_BUILD_TYPE})
#convert checks for deubug / release
string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
if(CMAKE_BUILD_TYPE STREQUAL "debug")
@Lightnet
Lightnet / gunjstrustsharekeyv3.js
Last active May 4, 2020 23:20
gunjstrustsharekeyv3
/*
Self contain Sandbox Gun Module chain for auth sea.js:
Created by: Lightnet
License: MIT
Version: 3.0
Last Update:2020.05.04
Credit: amark ( https://github.com/amark/gun)
Status(Work in progress!):
@Lightnet
Lightnet / mycustomtools.py
Created April 17, 2020 17:40
SImple rig and object rebuilds.
bl_info = {
"name": "Simple My Tools b28x",
"author":"Lightnet",
"version":(0,0,1),
"blender": (2,82,0),
"location": "Object",
"category": "Object",
"warning": "",
"wiki_url": "",
}
@Lightnet
Lightnet / blendercopyarmture.py
Last active April 13, 2020 19:34
blender armature copy bones to armature bone
import bpy
#source_rig = 'MBlab_sk'
#dest_rigs = ['Armature']
############
bone_data = {}
selectobjname = None
def edit_rig(rigname):
bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.object.select_all(action='DESELECT')
//===============================================
// CLEAR GUN DATABASE
localStorage.clear();
//(function() {
//===============================================
// INIT GUN DATABASE
let gunurl = window.location.origin+'/gun';
//console.log(gunurl);
var gun = Gun(gunurl);
gun.on('hi', peer => {//peer connect
@Lightnet
Lightnet / clientprototype.js
Last active September 26, 2019 06:00
gunjstrustsharekey.js
//===============================================
// CLEAR GUN DATABASE
localStorage.clear();
//(function() {
//===============================================
// INIT GUN DATABASE
let gunurl = window.location.origin+'/gun';
//console.log(gunurl);
var gun = Gun(gunurl);
gun.on('hi', peer => {//peer connect
@Lightnet
Lightnet / gunjstrustsharekey.js
Last active January 28, 2021 09:14
gunjstrustsharekeyv3
/*
Self contain Sandbox Gun Module chain for auth sea.js:
Created by: Lightnet
License: MIT
Version: 3.0
Last Update:2019.08.17
Credit: amark ( https://github.com/amark/gun)
Status(Work in progress!):
@Lightnet
Lightnet / gunadapteracces,js
Created August 7, 2019 21:14
gunadapteracces
;(function(){
/* UNBUILD */
var root;
if(typeof window !== "undefined"){ root = window }
if(typeof global !== "undefined"){ root = global }
root = root || {};
var console = root.console || {log: function(){}};
function USE(arg, req){
return req? require(arg) : arg.slice? USE[R(arg)] : function(mod, path){
@Lightnet
Lightnet / client.js
Created July 31, 2019 18:25
Gun 2 Server Instance
// var Gun = require('gun'); // in NodeJS
// var Gun = require('gun/gun'); // in React
//console.log(location.host+"/gun");
//console.log(window.location.href+'gun');
//console.log('http://localhost:8080/gun');
//console.log(window.location.origin+'/gun');
//var gun = Gun(window.location.origin+'gun');
let gunurl = window.location.origin+'/gun';
@Lightnet
Lightnet / gunjstrustsharekeyv2.js
Last active January 28, 2021 09:14
add share key graph node for gunjs for more options
/*
Self contain Sandbox Gun Module:
Created by: Lightnet
Credit: amark ( https://github.com/amark/gun)
License: MIT