画像を処理して遊んだり開発したりするときのtipsを共有します
@uiureo ウイウ
最近、ネオ目黒ラインというサービスを作りました
#!/bin/bash | |
# This script resolves a DID, retrieves an API key, fetches a user's feed, | |
# and posts a "Hello, world" message to the user's feed. | |
# Resolve DID for handle | |
HANDLE='felicitas.pojtinger.com' | |
DID_URL="https://bsky.social/xrpc/com.atproto.identity.resolveHandle" | |
export DID=$(curl -G \ | |
--data-urlencode "handle=$HANDLE" \ |
docker system prune | |
docker container prune | |
docker rm -f `docker ps -a -q` | |
docker image prune | |
docker rmi $(docker images -a -q) | |
docker volume prune | |
docker network prune |
#!/bin/zsh | |
<<'ABOUT_THIS_SCRIPT' | |
----------------------------------------------------------------------- | |
Written by:William Smith | |
Professional Services Engineer | |
Jamf | |
bill@talkingmoose.net |
const fs = require('fs'); | |
const path = require('path'); | |
const dotenv = require('dotenv'); | |
const {Enigma, utils, eeConstants} = require('enigma-js/node'); | |
var EnigmaContract; | |
if(typeof process.env.SGX_MODE === 'undefined' || (process.env.SGX_MODE != 'SW' && process.env.SGX_MODE != 'HW' )) { | |
console.log(`Error reading ".env" file, aborting....`); | |
process.exit(); | |
} else if (process.env.SGX_MODE == 'SW') { |
import Foundation | |
import PlaygroundSupport | |
PlaygroundPage.current.needsIndefiniteExecution = true | |
let credential = URLCredential(user: “username@gmail.com”, password: “password”, persistence: URLCredential.Persistence.forSession) | |
let protectionSpace = URLProtectionSpace(host: "example.com", port: 443, protocol: "https", realm: "Restricted", authenticationMethod: NSURLAuthenticationMethodHTTPBasic) | |
URLCredentialStorage.shared.setDefaultCredential(credential, for: protectionSpace) | |
let config = URLSessionConfiguration.default |
#!/usr/bin/env bash | |
# | |
# Auto install latest kernel for TCP BBR | |
# | |
# System Required: CentOS 6+, Debian7+, Ubuntu12+ | |
# | |
# Copyright (C) 2016-2017 Teddysun <i@teddysun.com> | |
# | |
# URL: https://teddysun.com/489.html | |
# |
import Foundation | |
struct User: Codable { | |
struct Address: Codable { | |
let street: String | |
let city: String | |
let state: String | |
} | |
let name: String | |
let address: Address |
#!/bin/bash | |
AmbientChannelId=700 # 自分のチャネルIDに置き換えてください | |
AmbientWriteKey="your_writekey" # 自分のライトキーに置き換えてください | |
DeviceId="28-03146b3a47ff" # 自分のデバイスIDに置き換えてください | |
INTERVAL=60 # 取得間隔(秒) | |
while true;do | |
temp=`cat /sys/bus/w1/devices/$DeviceId/w1_slave | awk 'BEGIN {FS="="} NR==2{print $2 / 1000.0}'` | |
JSON="{\"writeKey\":\"${AmbientWriteKey}\",\"d1\":\"${temp}\"}" |
画像を処理して遊んだり開発したりするときのtipsを共有します
@uiureo ウイウ
最近、ネオ目黒ラインというサービスを作りました
import nfc | |
servc = 0x100B | |
def connected(tag): | |
service_code = [nfc.tag.tt3.ServiceCode(servc >> 6, servc & 0x3f)] | |
bc_id = [nfc.tag.tt3.BlockCode(i) for i in range(3)] | |
bc_name = [nfc.tag.tt3.BlockCode(3)] | |
print tag.read_without_encryption(service_code, bc_id) # 学籍番号を含むID | |
print tag.read_without_encryption(service_code, bc_name).decode('shift-jis') # 半角カナの名前 |