Skip to content

Instantly share code, notes, and snippets.

View chibiegg's full-sized avatar

こたまご (chibiegg) chibiegg

View GitHub Profile
@chibiegg
chibiegg / attest.py
Last active July 23, 2024 12:51
SEV-SNP / COCONUT-SVSM Remote Attestation Demo
"""
MIT License
Copyright (c) 2024 chibiegg.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@chibiegg
chibiegg / sakura-advent-2016-23.md
Last active December 25, 2016 13:59
さくらのIoT Platform βの今後のロードマップ

この記事は さくらインターネット Advent Calendar 2016 23日目の記事です。

2015年のさくらの聖夜でコンセプトを発表してちょうど一年が経ちました。 おかげさまで、5月にα版、11月にβ版を出荷することができました。

まだまだβ版でも実装できていない機能もいっぱいありますが、これからのロードマップについてかける範囲で少し書こうと思います。

通信モジュール (β版で提供予定)

ファイル配信機能

<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
function convert(){
// 345116N1360617E
// 34°51'16"136°06'17"
int main(){
int i = 0;
int n = rand();
while(i++<n){
printf("%d",i);
}
return 0;
}
.section __TEXT,__text,regular,pure_instructions
int main(){
int i = 0;
while(i++<10){
}
return 0;
}
.section __TEXT,__text,regular,pure_instructions
.globl _main
.align 4, 0x90
import socket
import struct
sock = socket.socket(socket.AF_INET,socket.SOCK_RAW,89) #OSPF_IGP
data = [ 0x02,0x01,0x00,0x30, 10, 133, 0, 1,0x00,0x00,0x00,0x01,
0xe7,0x12,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x0a,0x02,0x01,0x00,0x00,0x00,0x28, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
10, 255, 255, 2,
@chibiegg
chibiegg / gist:8486999
Created January 18, 2014 06:30
publey/admin.py
# encoding=utf-8
from django.contrib import admin
from pubkey.models import PublicKey, Server
admin.site.register(Server, admin.ModelAdmin)
admin.site.register(PublicKey, admin.ModelAdmin)
@chibiegg
chibiegg / gist:8486846
Created January 18, 2014 06:07
login.html
<html>
<head>
<title>ログイン</title>
</head>
<body>
<h1>ログイン</h1>
<p>ユーザー名とパスワードを入力してください</p>
{% if form.errors %}<p>ユーザー名またはパスワードが違います</p>{% endif %}
url(r'^login/$', 'pubkey.views.login_view', name='login_view'),
@chibiegg
chibiegg / gist:8486811
Created January 18, 2014 06:04
views.py
# encoding=utf-8
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.auth import login
from django.shortcuts import redirect, render
def login_view(request):
if request.method == "POST":
form = AuthenticationForm(request.POST)