Skip to content

Instantly share code, notes, and snippets.

View magicien's full-sized avatar
😴
Having a doze

magicien magicien

😴
Having a doze
View GitHub Profile
import Foundation
import SceneKit
let json = """
{
"position": [2.0, 5.0, 3.0],
"rotation": [0.0, 0.73, 0.0, 0.73]
}
""".data(using: .utf8)!
@magicien
magicien / rpgtkool_mz_functions_v1.2.1.md
Last active May 1, 2021 10:12
RPGtkool MZ v1.2.1 API functions
@magicien
magicien / CreateJWT.php
Created September 9, 2017 22:06
How to create JWT with lcobucci/jwt in PHP
<?php
require_once('../composer/vendor/autoload.php');
use Lcobucci\JWT\Builder;
use Lcobucci\JWT\Signer\Rsa\Sha256;
$signer = new Sha256();
$key = <<<EOT
-----BEGIN RSA PRIVATE KEY-----
@magicien
magicien / draw-outline.lua
Last active February 14, 2021 11:59
OBS用スクリプト:縁取りフィルタ(簡易版)
obs = obslua
bit = require('bit')
SETTING_ALPHA_THRESHOLD = 'alpha_threshold'
SETTING_LINE_COLOR = 'line_color'
SETTING_LINE_ALPHA = 'line_alpha'
SETTING_LINE_WIDTH = 'line_width'
TEXT_ALPHA_THRESHOLD = '透明度閾値'
TEXT_LINE_COLOR = '線の色'
@magicien
magicien / eos_friend_data_sample_1.swift
Created May 30, 2020 16:37
Epic Online Services: Get friend data sample in Swift
import EOSSDK
var platformHandle: EOS_HPlatform
var accountID: EOS_EpicAccountId
// 1. Send a query to get friends info
func getFriends() {
guard let friendsHandle = EOS_Platform_GetFriendsInterface(platformHandle) else {
return
}
@magicien
magicien / eos_friend_data_sample_1.swift
Created May 30, 2020 16:37
Epic Online Services: Get friend data sample in Swift
import EOSSDK
var platformHandle: EOS_HPlatform
var accountID: EOS_EpicAccountId
// 1. Send a query to get friends info
func initAndLogin() {
guard let friendsHandle = EOS_Platform_GetFriendsInterface(platformHandle) else {
return
}
@magicien
magicien / eos_user_data_sample.swift
Last active May 30, 2020 13:37
Epic Online Services: Get user data sample in Swift
import EOSSDK
var platformHandle: EOS_HPlatform
// 1. Initialize
// https://gist.github.com/magicien/a892304c22574d59923dccc95571b990
func init() {
// Initialize App, Platform
// Login
@magicien
magicien / eos_user_data_sample.swift
Created May 28, 2020 15:07
Epic Online Services: Get user data sample in Swift
import EOSSDK
var platformHandle: EOS_HPlatform
// 1. Initialize
// https://gist.github.com/magicien/a892304c22574d59923dccc95571b990
func init() {
// Initialize App, Platform
// Login
@magicien
magicien / EOSSDK2_module.map
Created May 24, 2020 14:18
module.map for Epic Online Services SDK (libEOSSDK-Mac-Shipping.dylib) ver2
module EOSSDK {
umbrella header "libEOSSDK-umbrella.h"
export *
module * { export * }
}
@magicien
magicien / libEOSSDK-umbrella.h
Created May 24, 2020 14:15
Umbrella file for libEOSSDK
#import <eos_base.h>
#import <eos_common.h>
#import <eos_achievements.h>
#import <eos_achievements_types.h>
#import <eos_auth.h>
#import <eos_auth_types.h>
#import <eos_connect.h>
#import <eos_connect_types.h>
#import <eos_ecom.h>
#import <eos_ecom_types.h>