This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
let json = """ | |
{ | |
"user_id": 1, | |
"user_name": "magicien", | |
"url": "http://darkhorse2.0spec.jp" | |
} | |
""".data(using: .utf8)! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
let json = """ | |
{ | |
"user_id": 1, | |
"user_name": "magicien", | |
"friends": [ | |
{ | |
"user_id": 2, | |
"is_best_friend": true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
let json = """ | |
{ | |
"user_id": 1, | |
"user_name": "magicien", | |
"friends": [ | |
{ | |
"user_id": 2, | |
"is_best_friend": true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
let json = """ | |
{ | |
"user_id": 1, | |
"user_name": "magicien", | |
"friends": [ | |
{ | |
"user_id": 2, | |
"is_best_friend": true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
let json = """ | |
[ | |
{ "name": "magicien" }, | |
{ }, | |
{ "name": "NoName" } | |
] | |
""".data(using: .utf8)! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
// framework側のコード | |
let ExtensionKey = CodingUserInfoKey(rawValue: "extensionKey")! | |
struct Group: Codable { | |
let users: [User] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let url = URL(fileURLWithPath: pngFileName, relativeTo: directoryPath) | |
// let reddishImage = NSImage(contentsOf: url) | |
let cgDataProvider = CGDataProvider(url: url as CFURL)! | |
let cgImage = CGImage(pngDataProviderSource: cgDataProvider, decode: nil, shouldInterpolate: false, intent: CGColorRenderingIntent.defaultIntent)! | |
let imageSize = CGSize(width: cgImage.width, height: cgImage.height) | |
let correctImage = NSImage(cgImage: cgImage, size: imageSize) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
let json = """ | |
{ | |
"nodes": [ | |
{ | |
"extensions": { | |
"KHR_materials_common": { | |
"light": 0 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express') | |
const session = require('express-session') | |
const passport = require('passport') | |
const GitHubStrategy = require('passport-github2').Strategy | |
const clientId = process.env.GITHUB_APP_CLIENT_ID | |
const clientSecret = process.env.GITHUB_APP_CLIENT_SECRET | |
const domainName = process.env.DOMAIN_NAME | |
const app = express() |
OlderNewer